Homework #3

ASTR 3800

Due February 2, 2016

sample = np.power(10, log_sample)

mean, median = density.Summarize(sample)

cdf = thinkstats2.Cdf(sample)

print('cdf[mean]', cdf[mean])

pdf = thinkstats2.EstimatedPdf(sample)

thinkplot.Pdf(pdf)

thinkplot.Show(xlabel='household income',

ylabel='PDF')

and comment it out.If you get a blank plot, like I did in Canopy, edit the hinkplot.py module. Go to line 627&628 and comment out

the Clf lines as shown below.

"""Shows the plot.

For options, see Config.

options: keyword args used to invoke various pyplot functions

"""

clf = options.pop('clf', True)

Config(**options)

# if clf:

# Clf()

pyplot.show(options)

Print out your plot and turn it in.

Sum up the bins. How many bins does it take to get the total to be within 10^-6 of unity?

Use your python code to integrate between values.

What IQ has a probability of 10billion to one of being above? (That's the smartest person in history.)

What is the probability of having an IQ below zero? (yes, yes, I know its zero. But mathematically it's not.)