Download Statistics Review ppt

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Degrees of freedom (statistics) wikipedia , lookup

Foundations of statistics wikipedia , lookup

Confidence interval wikipedia , lookup

Bootstrapping (statistics) wikipedia , lookup

History of statistics wikipedia , lookup

Taylor's law wikipedia , lookup

Resampling (statistics) wikipedia , lookup

Student's t-test wikipedia , lookup

Misuse of statistics wikipedia , lookup

Transcript
Beak of the Finch
Natural Selection
Statistical Analysis
Key Concepts and Learning Objectives
•
Evolution by way of natural selection can only occur if heritable traits vary
among individuals in a population.
•
In a given environment, individuals with one form of a trait may be able to
better exploit some aspects of the environment than individuals with other
forms of the trait can.
•
Natural selection involves the differential survival and reproduction of
individuals with different heritable traits.
•
Evolution occurs when inherited traits in a population change over
successive generations.
•
Graphing allows scientists to more readily identify patterns and trends in
data, including in ecological and population data.
•
Statistical tools provide a way to quantify variability in biological data and
describe the degree of uncertainty in the results obtained using these data.
Part A: Calculating Descriptive Statistics
1. What is a “mean?”
2. What is the “standard deviation” and what does
it tell us?
3. What is the “standard error of the mean” and the
“confidence interval”?
4. What is a “t-test” and what does the “t-test” tell
us?
5. What is “Chi-square” and what does it tell us?
6. How do scientists determine if their data are
statistically significant?
The “mean”
• In order to analyze a trait from an entire
population, scientists will focus on a small
subset of individuals from that population.
• Ideally, this small subset will generate data
that is referred to as “normally distributed.”
The Mean:
Finch #
1
2
3
4
5
Beak
Depth
(mm)
7.1
11.2
9.3
9.0
8.5
(7.1+11.2+9.3+9.0+8.5)/5 = 45.1/5 = 9.02mm
Measures of Variability
• Variability describes the extent to which
numbers in a data set diverge from the
central tendency. It is a measure of how
“spread out” the data are. The most
common measures of variability are range,
variance and standard deviation .
The Sample Standard Deviation (s)
• The sample standard deviation (s) is
essentially the average of the deviation
between each measurement in the sample
and the sample mean ( ). The sample
standard deviation is an estimate of the
standard deviation in the larger population.
= # of samples
= individual measurement
= sample mean
The Sample Standard Deviation (s)
Finch #
1
2
3
4
5
Beak
Depth
(mm)
7.1
11.2
9.3
9.0
8.5
=
(7.1-9.02)2 + (11.2-9.02)2 + (9.3-9.02)2 + (9.0-9.02)2 + (8.5-9.02)2
(5-1)
3.69 + 4.75 + 0.078 + 0.0004 + 0.27
4
2.197
8.79
=
4
= 1.48
What does the standard deviation mean for
normally distributed data?
1 SD 1 SD
34.1% 34.1%
2 SD
2 SD
47.5%
47.5%
• For normally distributed data, 68% of the measurements will fall within 1 SD
of the mean.
• 95% of the measurements will fall within 2 SD of the mean.
Graphing the Mean and SD
Beak depth (mm)
1
7.1
2
11.2
3
9.3
4
9
5
8.5
9.02
Finch Beak depth
Average Beak depth (mm)
Finch#
Mean
12
10.5mm
10
8
6
7.54mm
4
2
0
1
Mean
1.482228053
SD
Measures of confidence
Standard Error of the Mean and 95% Confidence Interval
• The standard deviation (s) represents how “spread out” measurements in a sample
population are from the sample mean ( ).
• However, the sample mean is not necessarily identical to the population mean. This
degree of error between the sample mean and the population mean is represented
by the “standard error of the mean” (SEM).
• Unlike standard deviation, which focuses only on the sample population and
sample mean, the SEM tells us how close the sample mean is to the population
mean.
S = standard deviation
n = # of samples
• For the SEM, the larger your sample size (n), the smaller your SEM (smaller error
bars). The smaller your SEM, the closer your sample mean is to the population mean.
Example : Calculating & Graphing SEM
9.68mm
(larger error bar)
SEM = 1.48
5
8.36mm
= 0.66
SEM = 1.44
20
= 0.32
(smaller error bar)
9.51mm
8.87mm
Measures of confidence
Standard Error of the Mean and 95% Confidence Interval
• The 95% confidence interval (95% CI) is related to the SEM in that there’s a 68%
chance that the population mean falls within +/- 1SEM of your sample mean and a
95% chance that the population mean falls within +/- 2SEMs from your sample
mean.
-1 SEM +1 SEM
34.1% 34.1%
-2 SEM
47.5%
+2 SEM
47.5%
• The equation for 95% CI is:
95% CI = 1.96s
which is typically rounded to
95% CI =
2s
n
n
The 95% CI is essentially the SEM x 2.
Calculating & Graphing SEM vs. 95% CI error bars
Finch#
1
2
3
4
5
6
7
8
9
10
Mean
SD
SEM=
Body Mass (g)
15.7
12.3
14.4
17.1
15.5
13.8
11.6
14.2
12.7
14.9
14.22
1.69
2s
95% CI =
n
(14.75g)
(13.69g)
(15.29g)
(13.15g)
= 1.69
10
= 0.53
= 2(1.69)
10
= 1.07
Inferential Statistics:
What it means for data to be “statistically significant”
Scientists want to determine if Royal Blue Tang fish (delicious prey for
carnivorous sharks) swim faster when surrounded by sharks compared to
being in a shark-free environment. They measured and graphed the velocities
of six fish in both a shark-free and shark-filled tank.
What it means for data to be “statistically significant”
Velocities
of BlueTang fish
(mph)
Mean
SD
SEM
95% CI
Error bars: +/- SEM
Shark-free tank Shark-filled tank
20.2
35.5
17.8
40.2
19.3
38.8
22.3
42.5
25.6
60.8
24.7
47.9
21.65
44.28
3.09
9.09
1.26
3.71
2.52
7.42
Error bars: 95% CI
What it means for data to be “statistically significant”
Error bars: +/- SEM
Error bars: 95% CI
• Based on the graph and error bars (SEM or 95%CI) would you
conclude there’s a difference in how fast the fish swim between the
shark and shark-free group? Would you conclude this difference is
“statistically significant”?
•Why?
What it means for data to be “statistically significant”
Error bars: +/- SEM
Error bars: 95% CI
• Based on the graph and error bars (SEM or 95%CI) would you conclude there’s a
difference in how fast the fish swim between the shark and shark-free group? Would you
conclude this difference is “statistically significant”? Why?
• Since the error bars in each graph do not overlap, one would presume that the
difference in the velocities between the two groups is statistically significant, and the fish
in the shark-filled tank do indeed swim faster than those in a shark-free environment
• To be certain that there is a statistically significant difference between the two groups a
statistical test, referred to as the Student’s t-test, can be performed.
Inferential statistics: The Null hypothesis (H0), α (Alpha)
level and Student’s t-Test
• Statistical tests evaluate the null hypothesis (H0). The null hypothesis states that
there is no difference between two sample means ( 1 = 2), and therefore by
inference, no difference between two population means (μ1 = μ2).
• In our Blue-Tang fish example, the null hypothesis would state that the mean velocity
of fish in the shark-free tank equals the mean velocity of fish in the shark-infested
tank. Any differences between the mean velocities would purely be by chance, and not
statistically significant.
• The alternative hypothesis (H1) states that there is a statistically significant
difference between the two means.
• When performing a statistical test to either accept or reject H0, a significance level, or
Alpha (α) level, is set. The α level is the probability that you’ll reject the null
hypothesis when it’s actually true.
• Scientists usually set the α level at 0.05, meaning that when you perform your
statistical test to accept or reject H0, you can be 95% certain that your conclusion is
accurate.
Inferential statistics: The Null hypothesis (H0), α (Alpha)
level and Student’s t-Test
• The Student’s t-test is the statistical test used to determine whether to accept or
reject the null hypothesis ( 1 = . 2). It tells us if two data sets are indeed significantly
different.
• To perform the Student’s t-test, first calculate the tobs :
= sample mean
= sample variance*
= # of values
*
= The standard deviation, squared
=
Inferential statistics: Student’s t-Test continued…
Calculate the tobs for Blue-Tang velocity data:
Velocities
of BlueTang fish
(mph)
Mean
SD
SEM
95% CI
Shark-free tank Shark-filled tank
20.2
35.5
17.8
40.2
19.3
38.8
22.3
42.5
25.6
60.8
24.7
47.9
21.65
44.28
3.09
9.09
1.26
3.71
2.52
7.42
-22.63
1.59 + 13.77
(absolute
value)
21.65 – 44.28
3.092
6
22.63
15.36
+
9.092
6
= 5.77
Inferential statistics: Student’s t-Test continued…
• Once the tobs has been calculated, compare it with the tcritical value for the appropriate
α-level and degrees of freedom (df).
 The significance level (α) we are using here is 0.05
 Degrees of freedom = (n1 + n2) – 2 ; For our fish study, DF = (6+6) -2 = 10
• If the tobs > tcrit, then H0 is rejected. If tobs < tcrit, then you cannot reject the null
hypothesis (ie – the difference between the two groups is purely by chance).
tcrit for our study = 2.23
tobs = 5.77
Since tobs is greater than tcrit, we
can reject the null hypothesis and
say with 95% confidence (α=0.05)
that there is a difference in the
mean velocities of Blue-Tang fish
and it is statistically significant!
Analyzing frequencies : The Chi-Square Test
• The examples and analyses done so far have used sample populations that have
quantitative numerical measurements (ie – velocities, beak size, body mass, etc).
• But what about when you want to analyze the chance of something occurring? (ie –
heads vs. tails in a coin toss, frequency of a particular genotype in offspring, link
between disease exposure and death, etc).
• The Chi-Square Test allows us to determine whether a frequency pattern in a
sample population is statistically significant, or has occurred simply by chance.
• The following equation calculates the Chi-Square test statistic:
= Chi-Square value
= observed values
= expected values
• Performing the Chi-Square test is similar to the Student’s t-test in that the objective is
to accept or reject the null hypothesis (H0). The null hypothesis (H0) states that any
difference between the observed frequency and the expected frequency is purely by
chance, and not statistically significant.
Analyzing frequencies : The Chi-Square Test
Steps to performing a Chi-Square Analysis:
1. Establish what the H0 is for your study.
2. Determine the degrees of freedom (n-1). In this case, df refers to how
many traits/characteristics you’re observing.
3. Calculate the Chi-Square (X2) value from observed and expected data.
4. Determine if the X2 value is greater than or less than the critical value.
5. From this assessment, accept or reject the null hypothesis.
Analyzing frequencies : The Chi-Square Test
Example: When predicting the birth ratio of boys vs. girls, one would expect the chance
of each to be 50%:50%. This is your expected frequency. However, something unusual
has been reported in the town of Newton, MA where there is a mysteriously higher
frequency of boys vs. girls. Residents are suspicious of a possible environmental factor
that could be leading to these skewed birth outcomes.
You conduct a study to determine if this observation is true, or pure chance. After
collecting data from 50 births in Newton, you observe that 34 were boys and 16 were
girls. Is the difference between the observed frequency and expected frequency
statistically significant, or is this outcome likely due to chance?
Analyzing frequencies : The Chi-Square Test
1. Define H0: Any difference between the expected frequency of 1:1 (boy:girl) births,
and the observed frequency is purely due to chance and not statistically significant.
2. Chi-Square value calculations:
Gender
Observed (o)
Expected (e)
(o-e)
(o-e)2
(o-e)2/e
Boys
34
25
9
81
3.24
Girls
16
25
-9
81
3.24
X2 = 3.24 + 3.24 = 6.48
3. Determine the degrees of freedom (df): df = # of categories minus 1.
Here we have two categories (boys and girls), so df = 2-1 = 1.
4. Use the critical values table (next slide) to determine if the probability (p) of your
observed data occurred simply by chance, or if there is a statistically significant
difference between the observed and expected values. The p-value is essentially the
same as the α-level. Both values represent your significance/confidence level and are
usually set at 0.05 (95% confidence).
Analyzing frequencies : The Chi-Square Test
• If the X2 value > critical value for your significance level (usually set to p=0.05 for 95%
confidence) then you can reject the H0 and conclude that the difference between
observed and expected data is statistically significant.
• In our example, X2=6.48 and the critical value for df=1 (p=0.05) = 3.841. Because X2 >
critical value, we can reject the null hypothesis that the difference in frequency of
boy vs. girl births is due to chance.
• We are 95% confident that the difference is not due to chance, meaning there must be
some other explanation as to why there are so many more boys than girls born in Newton.
Furthermore, because 6.48 lies between p-values of 0.025 and 0.01, we can say with
97.5%-99% confidence that the greater population of male newborns is highly statistically
significant.