Beak of the Finch Natural Selection Statistical Analysis.

27
Beak of the Finch Natural Selection Statistical Analysis

Transcript of Beak of the Finch Natural Selection Statistical Analysis.

Page 1: Beak of the Finch Natural Selection Statistical Analysis.

Beak of the Finch

Natural Selection

Statistical Analysis

Page 2: 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.

Page 3: Beak of the Finch Natural Selection Statistical Analysis.

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?

Page 4: Beak of the Finch Natural Selection Statistical Analysis.

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.”

Page 5: Beak of the Finch Natural Selection Statistical Analysis.

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

Page 6: Beak of the Finch Natural Selection Statistical Analysis.

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 .

Page 7: Beak of the Finch Natural Selection Statistical Analysis.

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

Page 8: Beak of the Finch Natural Selection Statistical Analysis.

The Sample Standard Deviation (s)

Finch # 1 2 3 4 5

Beak Depth (mm)

7.1 11.2 9.3 9.0 8.5

=

(5-1)

(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

3.69 + 4.75 + 0.078 + 0.0004 + 0.27

4

8.79

4

= 2.197 = 1.48

Page 9: Beak of the Finch Natural Selection Statistical Analysis.

What does the standard deviation mean for normally distributed data?

1 SD 1 SD

34.1% 34.1%

2 SD 2 SD47.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.

Page 10: Beak of the Finch Natural Selection Statistical Analysis.

Graphing the Mean and SD

Finch# Beak depth (mm)  

1 7.1  

2 11.2  

3 9.3  

4 9  

5 8.5  

  9.02 Mean

  1.482228053 SD

Finch Beak depth

0

2

4

6

8

10

12

1

Mean

Aver

age

Beak

dep

th (m

m)

10.5mm

7.54mm

Page 11: Beak of the Finch Natural Selection Statistical Analysis.

Measures of confidenceStandard 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.

Page 12: Beak of the Finch Natural Selection Statistical Analysis.

Example : Calculating & Graphing SEM

SEM = 1.48

5

= 0.66

9.68mm

8.36mm

SEM = 1.44

20

= 0.32 9.51mm

8.87mm

(larger error bar)

(smaller error bar)

Page 13: Beak of the Finch Natural Selection Statistical Analysis.

Measures of confidenceStandard 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.

• The equation for 95% CI is:

95% CI = 1.96s

n

which is typically rounded to 95% CI = 2s

n

-1 SEM

34.1% 34.1%

-2 SEM47.5% 47.5%

+1 SEM

+2 SEM

The 95% CI is essentially the SEM x 2.

Page 14: Beak of the Finch Natural Selection Statistical Analysis.

Calculating & Graphing SEM vs. 95% CI error bars

SEM=

= 1.69

10

= 0.53

Finch# Body Mass (g)1 15.72 12.33 14.44 17.15 15.56 13.87 11.68 14.29 12.7

10 14.9Mean 14.22

SD 1.69

95% CI =n

= 2(1.69)

2s

10

= 1.07

(14.75g)

(13.69g)

(15.29g)

(13.15g)

Page 15: Beak of the Finch Natural Selection Statistical Analysis.

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.

Page 16: Beak of the Finch Natural Selection Statistical Analysis.

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

Mean 21.65 44.28SD 3.09 9.09

SEM 1.26 3.7195% CI 2.52 7.42

Velocities of Blue-

Tang fish (mph)

What it means for data to be “statistically significant”

Error bars: +/- SEM Error bars: 95% CI

Page 17: Beak of the Finch Natural Selection Statistical Analysis.

Error bars: +/- SEM Error bars: 95% CI

What it means for data to be “statistically significant”

• 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?

Page 18: Beak of the Finch Natural Selection Statistical Analysis.

Error bars: +/- SEM Error bars: 95% CI

What it means for data to be “statistically significant”

• 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.

Page 19: Beak of the Finch Natural Selection Statistical Analysis.

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.

Page 20: Beak of the Finch Natural Selection Statistical Analysis.

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*

=

Page 21: Beak of the Finch Natural Selection Statistical Analysis.

(absolutevalue)

Inferential statistics: Student’s t-Test continued…

Calculate the tobs for Blue-Tang velocity data:

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

Mean 21.65 44.28SD 3.09 9.09

SEM 1.26 3.7195% CI 2.52 7.42

Velocities of Blue-

Tang fish (mph)

21.65 – 44.28

3.092

69.092

6+

-22.63

1.59 + 13.77

22.63

15.36

= 5.77

Page 22: Beak of the Finch Natural Selection Statistical Analysis.

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!

Page 23: Beak of the Finch Natural Selection Statistical Analysis.

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:

• 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.

= Chi-Square value

= observed values

= expected values

Page 24: Beak of the Finch Natural Selection Statistical Analysis.

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.

Page 25: Beak of the Finch Natural Selection Statistical Analysis.

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?

Page 26: Beak of the Finch Natural Selection Statistical Analysis.

Analyzing frequencies : The Chi-Square Test

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).

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

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.

X2 = 3.24 + 3.24 = 6.48

Page 27: Beak of the Finch Natural Selection Statistical Analysis.

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.