Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Makes a CDF from a Pmf object.

Args:
   d: dictionary that maps values to frequencies.
   name: string name for the data.

Returns:
    Cdf object

        def MakeCdfFromPmf(pmf, name=None):
    """Makes a CDF from a Pmf object.

    Args:
       d: dictionary that maps values to frequencies.
       name: string name for the data.

    Returns:
        Cdf object
    """
    if name == None:
        name = pmf.name
    return MakeCdfFromItems(pmf.Items(), name)
        


src/t/h/thinkstats-HEAD/thinkstats_resources/social.py   thinkstats(Download)
def MakeFigures(pmf, biased_pmf):
    """Makes figures showing the CDF of the biased and unbiased PMFs"""
    cdf = Cdf.MakeCdfFromPmf(pmf, 'unbiased')
    print 'unbiased median', cdf.Percentile(50)
    print 'percent < 100', cdf.Prob(100)
    print 'percent < 1000', cdf.Prob(1000)
 
 
    biased_cdf = Cdf.MakeCdfFromPmf(biased_pmf, 'biased')

src/t/h/thinkstats-HEAD/thinkstats_resources/relay_soln.py   thinkstats(Download)
               show=False)
 
    cdf = Cdf.MakeCdfFromPmf(biased)
    myplot.Cdf(cdf,
               root='observed_speeds_cdf',

src/t/h/thinkstats-HEAD/thinkstats_resources/Pmf_test.py   thinkstats(Download)
        self.checkPmf(pmf)
 
        cdf = Cdf.MakeCdfFromPmf(pmf)
        pmf2 = Pmf.MakePmfFromCdf(cdf)
        self.checkPmf(pmf2)