Statistics Made Easy-Basics
Transcript of Statistics Made Easy-Basics
-
7/29/2019 Statistics Made Easy-Basics
1/12
Statistics made easyStatistics made easyBasic principlesBasic principles
-
7/29/2019 Statistics Made Easy-Basics
2/12
Statistics made easyStatistics made easy
Assume we are interested in getting someAssume we are interested in getting someinformation about the average height ofinformation about the average height ofpeople in this roompeople in this room
One basic information would be providedOne basic information would be providedby theby the meanmean : adding individual heights: adding individual heightsand divide it by the number of peopleand divide it by the number of people
The mean gives us some idea about theThe mean gives us some idea about theaverage height, but how much does itaverage height, but how much does itreally say?really say?
-
7/29/2019 Statistics Made Easy-Basics
3/12
MeanMean
Which information can be derived by theWhich information can be derived by themean of the class?mean of the class?
Can we generalize this information?Can we generalize this information? What sort of generalization can we reallyWhat sort of generalization can we really
made?made? This group is not truly a random sample.This group is not truly a random sample.
It is predominant male but there is aIt is predominant male but there is apercentage of women.percentage of women.
It is multi-cultural.It is multi-cultural.
-
7/29/2019 Statistics Made Easy-Basics
4/12
How statistics can go wrongHow statistics can go wrong
Statistics are often used inStatistics are often used inpop sciencepop science..
The idea is that we select aThe idea is that we select a
representativerepresentative
sample of a population,sample of a population,
perform some tests and then convert theperform some tests and then convert theresults into numbers and performresults into numbers and performstatistics, i.e. calculating the mean.statistics, i.e. calculating the mean.
How can we be sure that the sample doesHow can we be sure that the sample doesrepresent the behavior of the population?represent the behavior of the population?
How do we interpret the mean?How do we interpret the mean?
-
7/29/2019 Statistics Made Easy-Basics
5/12
Second order StatisticsSecond order Statistics
Even if the sample is representative ofEven if the sample is representative ofthe population, is the mean (first orderthe population, is the mean (first orderstatistics) enough to provide information?statistics) enough to provide information?
Think of i.e. certain countries where thereThink of i.e. certain countries where thereis a social polarization, i.e. the rich areis a social polarization, i.e. the rich arevery rich, the poor are very poor andvery rich, the poor are very poor and
there is no middle class.there is no middle class.
This is why we introduce the meaning ofThis is why we introduce the meaning ofvariance.variance.
-
7/29/2019 Statistics Made Easy-Basics
6/12
Variance and Standard DeviationVariance and Standard Deviation
Variance:Variance:
When variance is computed over aWhen variance is computed over a
sample: denominator N-1sample: denominator N-1
Standard Deviation: the square root ofStandard Deviation: the square root of
variancevariance
( )N
i
N
i
x! "2
-
7/29/2019 Statistics Made Easy-Basics
7/12
The so-calledThe so-called normalnormal distributiondistribution
-5 -4 -3 -2 -1 0 1 2 3 4 50
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
!=1
!=0.5
-
7/29/2019 Statistics Made Easy-Basics
8/12
CorrelationCorrelation
Second order statisticsSecond order statistics
Assume that we have two observedAssume that we have two observed
variables. Correlation reveals the degreevariables. Correlation reveals the degreeofoflinearlinearrelationship between them.relationship between them.
The correlation coefficient may take onThe correlation coefficient may take on
any value between plus and minus one.any value between plus and minus one.
-
7/29/2019 Statistics Made Easy-Basics
9/12
MatlabMatlab functionsfunctions
Mean :Mean : mean(xmean(x), x: a vector or matrix), x: a vector or matrix
Standard deviation:Standard deviation: std(xstd(x))
Correlation coefficients:Correlation coefficients: corrcoef(x,ycorrcoef(x,y),),where x and y two column vectorswhere x and y two column vectors
representing the observationsrepresenting the observations
-
7/29/2019 Statistics Made Easy-Basics
10/12
MatlabMatlab examples (1)examples (1)
X=[0:10];X=[0:10]; mean(Xmean(X))
ansans ==
55
std(Xstd(X))ansans ==
2.88722.8872
Y=5*X;Y=5*X; corrcoef(x,ycorrcoef(x,y))
ans =ans =1.0000 1.00001.0000 1.0000
1.0000 1.00001.0000 1.0000
-
7/29/2019 Statistics Made Easy-Basics
11/12
MatlabMatlab examples (2)examples (2)
Y=10*x;Y=10*x; corrcoef(X,Ycorrcoef(X,Y))
ans =ans =
1.0000 1.00001.0000 1.00001.0000 1.00001.0000 1.0000
Y=10*(x.^5); corrcoef(X,Y)Y=10*(x.^5); corrcoef(X,Y)
ans =ans =
1.0000 0.82071.0000 0.8207
0.8207 1.00000.8207 1.0000
-
7/29/2019 Statistics Made Easy-Basics
12/12
MatlabMatlab examples (3)examples (3)
Y=10*(X.^10);Y=10*(X.^10); corrcoef(X,Ycorrcoef(X,Y))
ans =ans =
1.0000 -0.00001.0000 -0.0000-0.0000 1.0000-0.0000 1.0000
Y=-10*X;Y=-10*X; corrcoef(X,Ycorrcoef(X,Y))
ans =ans =
1.0000 -1.00001.0000 -1.0000
-1.0000 1.0000-1.0000 1.0000