def NormalProbabilityPlot(sample, fit_color='0.8', **options):
 (xs, ys) = NormalProbability(sample)
 (mean, var) = MeanVar(sample)
 std = math.sqrt(var)
 fit = FitLine(xs, mean, std)
 thinkplot.Plot(color=fit_color, label='model', *fit)
 (xs, ys) = NormalProbability(sample)
 thinkplot.Plot(xs, ys, **options)

def NormalProbabilityPlot ( sample , fit_color = '0.8' , ** options ) : ( xs , ys ) = NormalProbability ( sample ) ( mean , var ) = MeanVar ( sample ) std = math . sqrt ( var ) fit = FitLine ( xs , mean , std ) thinkplot . Plot ( color = fit_color , label = 'model' , * fit ) ( xs , ys ) = NormalProbability ( sample ) thinkplot . Plot ( xs , ys , ** options )
makes a normal probability plot with a fitted line .