Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables &...

17
Quick and Simple Quick and Simple Statistics Statistics Peter Kasper Peter Kasper

Transcript of Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables &...

Page 1: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Quick and Simple Quick and Simple StatisticsStatistics

Peter KasperPeter Kasper

Page 2: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Basic ConceptsBasic Concepts

Variables & DistributionsVariables & Distributions Mean & Standard DeviationMean & Standard Deviation Estimators & ErrorsEstimators & Errors Comparing Two Sample ResultsComparing Two Sample Results SignificanceSignificance t-Testst-Tests

Page 3: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Variables & Variables & DistributionsDistributions A Variable is anything that can A Variable is anything that can

be ..be ..– Measured (continuous variable)Measured (continuous variable)

E.g. The height of vegetation in an areaE.g. The height of vegetation in an area

– Counted (discreet variable)Counted (discreet variable) E.g. The number of birds in an areaE.g. The number of birds in an area

– Categorized (categorical variable)Categorized (categorical variable) E.g. Birds that are E.g. Birds that are grassland specialistsgrassland specialists

or or notnot grassland specialistsgrassland specialists

Page 4: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Variables & Variables & DistributionsDistributions Each variable has a “natural” Each variable has a “natural”

distribution i.e. the frequency at distribution i.e. the frequency at which particular values of the which particular values of the variable occurvariable occur

A common example is the “Bell A common example is the “Bell Curve”Curve”– In general can be arbitrary!In general can be arbitrary!

Page 5: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

0

0.2

0.4

0.6

0.8

1

1.2

0 1 2 3 4 5

A “Bell Curve” distribution

0

0.2

0.4

0.6

0.8

1

1.2

0 1 2 3 4 5

Another “Bell Curve” distribution

Different “average” value and different width

Page 6: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Mean & Standard Mean & Standard DeviationDeviation

The mean of a sample of The mean of a sample of nn measurements of some variable measurements of some variable is defined as ..is defined as ..

μμ = ∑= ∑ii vvii / / nn

The “standard deviation” or The “standard deviation” or width of the distribution is ..width of the distribution is ..

σσ 22 = ∑= ∑ii ( (vvii - - μμ ) )22 / ( / ( n n – 1 )– 1 )

Page 7: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

0

0.2

0.4

0.6

0.8

1

1.2

0 1 2 3 4 5

For a Bell Curve distribution

68% of values are within 1 of the mean

95% of values are within 2 of the mean

Page 8: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Mean 2.82 Standard Deviation 0.385 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 2.70 Standard Deviation 0.4810 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 2.96 Standard Deviation 0.6520 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 2.81 Standard Deviation 0.6840 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 2.93 Standard Deviation 0.7180 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 2.93 Standard Deviation 0.73160 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 2.96 Standard Deviation 0.77320 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 3.00 Standard Deviation 0.73640 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 2.99 Standard Deviation 0.721000 Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Mean 3.00 Standard Deviation 0.71infinite Measurements

0

20

40

60

80

100

120

0 1 2 3 4 5

Page 9: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Estimators & ErrorsEstimators & Errors

The values for The values for μμ and and σσ from from finite samples vary even if the finite samples vary even if the samples are part of the same samples are part of the same distributiondistribution

They are Estimators of the They are Estimators of the “true” values.“true” values.

The “error” on the estimators The “error” on the estimators indicates how much variation is indicates how much variation is expectedexpected

Page 10: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Estimators & ErrorsEstimators & Errors

The The SStandard tandard EError on the mean of a rror on the mean of a sample of sample of nn measurements is defined measurements is defined as ..as ..

SESEμμ = = σσ / √ / √nn The error gets smaller as the sample The error gets smaller as the sample

size increasessize increases μμ has a “Bell Curve” distribution with has a “Bell Curve” distribution with

mean = “true mean” and SD = mean = “true mean” and SD = SESEμμ

Page 11: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Comparing ResultsComparing Results

Assume two different samples …Assume two different samples …– Are they from the same distribution?Are they from the same distribution?– Compare the two meansCompare the two means– The difference in the means will The difference in the means will

usually not be zerousually not be zero– How do we measure the significance How do we measure the significance

of an observed differenceof an observed difference It will clearly depend on the standard It will clearly depend on the standard

errorserrors

Page 12: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

Comparing ResultsComparing Results

The standard error on the difference The standard error on the difference between to quantities is defined as ..between to quantities is defined as ..

SESEdiffdiff = √( = √( SESE1122 + + SESE22

22 ) )

If the two results are from the same If the two results are from the same distribution (“Null Hypothesis”)distribution (“Null Hypothesis”)– The difference will be a “Bell Curve” The difference will be a “Bell Curve”

distribution with mean = zero and distribution with mean = zero and Standard Deviation = Standard Deviation = SESEdiffdiff

Page 13: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

SignificanceSignificance

Can use the difference of the Can use the difference of the means, means, ΔΔ, and its error to measure , and its error to measure the likelihood of an observed the likelihood of an observed difference.difference.

What is the probability of randomly What is the probability of randomly getting a bigger difference than we getting a bigger difference than we obtained?obtained?– Assuming a “Bell Curve” …Assuming a “Bell Curve” …– ProbabilityProbability = 32% if | = 32% if |ΔΔ| = | = SESEΔΔ

– ProbabilityProbability = 5% if | = 5% if |ΔΔ| = 2 x | = 2 x SESEΔΔ

Page 14: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

SignificanceSignificance

This is NOT the same thing as the This is NOT the same thing as the “probability that the two “probability that the two distributions are the same”.distributions are the same”.– ProbabilityProbability = 1 if = 1 if ΔΔ = = 0 0 !!– But it is clearly not impossible to But it is clearly not impossible to

measure the same mean from two measure the same mean from two similar but different distributionssimilar but different distributions

Page 15: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

t-Testst-Tests

When the size of a sample is small When the size of a sample is small (<30 measurements), we need to (<30 measurements), we need to take into account the uncertainty in take into account the uncertainty in the estimates of the Standard Errorsthe estimates of the Standard Errors

Instead of comparing Instead of comparing ΔΔ//SESEΔΔ with a with a “Normal” Bell curve distribution, “Normal” Bell curve distribution, Compare a variable Compare a variable tt with a with a tabulated t-distribution.tabulated t-distribution.

Page 16: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

t-Testst-Tests

The t variable is defined as The t variable is defined as tt = = ΔΔ / √( / √( ss22//nn11 + + ss22//nn22 ))

wherewhere

ss22 = { ( = { (nn11-1)-1)SESE1122 + ( + (nn22-1) -1) SESE11

22} / } / ((nn11++nn22-2)-2)

The number of degrees of The number of degrees of freedom (needed by the tables) freedom (needed by the tables) are (are (nn11-1) and (-1) and (nn22-1)-1)

Page 17: Quick and Simple Statistics Peter Kasper. Basic Concepts Variables & Distributions Variables & Distributions Mean & Standard Deviation Mean & Standard.

ConclusionConclusion

This talk has skipped a LOT of This talk has skipped a LOT of detailsdetails

It was designed to give you a feel It was designed to give you a feel for conceptsfor concepts

There are lots of resources on the There are lots of resources on the web and in the libraryweb and in the library