# Convert to PMF
pmf = st.Pmf(full_term.totalwgt_lb, label='Total Birth Weight')
H = st.Hist(full_term.totalwgt_lb, label='Total Birth Weight')

pmf == H.to_pmf()

Individual probabilities can be looked up 

pmf[8]
# same as pmf.prob(8)

"""
Explanation: Constructing PMFs
As twith histograms, and list like object or pandas Series can be converted to a Pmf object. Hist objects can also be converted using the Pmf constructor or with their to_pmf() method
End of explanation
"""


pmf.mean()
pmf.var()
pmf.std()
pmf.maximum_likelihood()

"""
Explanation: Methods
Summary stats
End of explanation
"""


pmf.prob_less(3)
pmf.prob_greater(4)

# Arithmatic 
pmf_first = st.Pmf(full_term.prglngth[full_term.birthord == 1], label='1st born')
pmf_other = st.Pmf(full_term.prglngth[full_term.birthord != 1], label='other')


(pmf_first - pmf_other).plot()

fig = st.multiplot((pmf_first, pmf_other))

pmf_other

pmf_first

"""
Explanation: Calculate Probabilities
End of explanation
"""


