Normal Distribution with Different Means and Variances
In[]:=
Plot[Table[PDF[NormalDistribution[μ,1.5],x],{μ,{-1,1,2}}]//Evaluate,{x,-6,6},FillingAxis]Plot[Table[PDF[NormalDistribution[0,σ],x],{σ,{.75,1,2}}]//Evaluate,{x,-6,6},FillingAxis]Manipulate[Plot[PDF[NormalDistribution[μ,σ],x],{x,-5,5},AxesOrigin{0,0},PlotRange{{-5,5},{0,0.4}}],{{μ,0},-4,4},{{σ,2},1,3}]
Out[]=
Out[]=
Out[]=
How well normal describes SP500 Returns?
In[]:=
sp500=FinancialData["SP500","FractionalChange",{{2000,1,1},{2009,1,1},"Day"}];edist=EstimatedDistribution[sp500,NormalDistribution[μ,σ]]
Out[]=
QuantityDistribution[NormalDistribution[-0.0118302,1.36004],]
In[]:=
hist=Histogram[sp500,Automatic,"PDF"];Show[hist,Plot[Table[PDF[NormalDistribution[-0.0118302,σ],x],{σ,0.8,1.5,0.3}]//Evaluate,{x,-3,3},PlotStyleThick,PlotRangeAll]]Manipulate[Show[Histogram[FinancialData["SP500","FractionalChange",{{2000,1,1},{2009,1,1},"Day"}],Automatic,"PDF"], Plot[PDF[NormalDistribution[-0.0118302,σ],x],{x,-10,12},PlotStyleThick,PlotRangeAll]],{{σ,1.36004},0.5,2}]
Out[]=
Out[]=
How about Chicago wind speed?
In[]:=
chit=Log[WeatherData["KORD","WindSpeed",{{2007,1,1},{2007,12,31},"Day"}]];hist=Histogram[chit,Automatic,"PDF"];edist=EstimatedDistribution[chit,NormalDistribution[μ,σ]];Show[hist,Plot[PDF[edist,x],{x,1,4},PlotStyleThick,PlotRangeAll]]
Out[]=
How about pressure?
In[]:=
chit=Log[WeatherData["KORD","Pressure",{{2007,1,1},{2007,12,31},"Day"}]];hist=Histogram[chit,Automatic,"PDF"];edist=EstimatedDistribution[chit,NormalDistribution[μ,σ]]Show[hist,Plot[PDF[edist,x],{x,6.8,7},PlotStyleThick,PlotRangeAll]]
Out[]=
NormalDistribution[6.92465,0.0064028]
Out[]=
In[]:=
pub=CloudPublish[EvaluationNotebook[]]
Out[]=