Data Analysis in Astronomy and Physics
Data Analysis in Astronomy and Physics Lecture 3: Statistics 2 Lecture_Note_3_Statistics_new.nb M. Röllig - SS19 Lecture_Note_3_Statistics_new.nb 3 Statistics Statistics are designed to summarize, reduce or describe data. A statistic is a function of the data alone! Example statistics for a set of data X1,X 2, … are: average, the maximum value, average of the squares,... Statistics are combinations of finite amounts of data. Example summarizing examples of statistics: location and scatter. 4 Lecture_Note_3_Statistics_new.nb Location Average (Arithmetic Mean) Out[ ]//TraditionalForm= N ∑Xi i=1 X N Example: Mean[{1, 2, 3, 4, 5, 6, 7}] Mean[{1, 2, 3, 4, 5, 6, 7, 8}] Mean[{1, 2, 3, 4, 5, 6, 7, 100}] 4 9 2 16 Lecture_Note_3_Statistics_new.nb 5 Location Weighted Average (Weighted Arithmetic Mean) 1 "N" In[36]:= equationXw ⩵ wi Xi "N" = ∑ wi i 1 i=1 Out[36]//TraditionalForm= N ∑wi Xi i=1 Xw N ∑wi i=1 1 1 1 1 In case of equal weights wi = w : Xw = ∑wi Xi = ∑wXi = w ∑Xi = ∑Xi = X ∑wi ∑w w N 1 N Example: data: xi, weights :w i = xi In[46]:= x1={1., 2, 3, 4, 5, 6, 7}; w1=1/ x1; x2={1., 2, 3, 4, 5, 6, 7, 8}; w2=1 x2; x3={1., 2, 3, 4, 5, 6, 7, 100}; w3=1 x3; In[49]:= x1.w1 Total[w1] x2.w2 Total[w2] x3.w3 Total[w3] Out[49]= 2.69972 Out[50]= 2.9435 Out[51]= 3.07355 6 Lecture_Note_3_Statistics_new.nb Location Median Arrange Xi according to size and renumber.
[Show full text]