34
{ Statistics Review One Semester in 50 minutes

{ Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Embed Size (px)

Citation preview

Page 1: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

{Statistics Review

One Semester in 50 minutes

Page 2: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Setting up a null-hypothesis and finding the p-value.

Page 3: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

QUESTION: Are babies more likely to pick the “good” toy then the “bad” toy after watching a video? (Investigation 1)

Page 4: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

QUESTION: Are babies more likely to pick the “good” toy then the “bad” toy after watching a video? (Investigation 1)

How would we answer this question?

Page 5: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

QUESTION: Are babies more likely to pick the “good” toy then the “bad” toy after watching a video?

Philosophy: Lets gather a bunch of data and find out how surprising our results are.

Page 6: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

1.We write a null hypothesis: the null hypothesis is the boring (“status-quo”) hypothesis that we want to show is unlikely to be true given our data.

Process:

Page 7: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

1.We write a null hypothesis: the null hypothesis is the boring (“status-quo”) hypothesis that we want to show is unlikely to be true given our data.

2.The alternative hypothesis is our research question. We are hoping to reject the null hypothesis in favor of the alternative hypothesis.

Process:

Page 8: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

1.We write a null hypothesis: the null hypothesis is the boring (“status-quo”) hypothesis that we want to show is unlikely to be true given our data.

2.The alternative hypothesis is our research question. We are hoping to reject the null hypothesis in favor of the alternative hypothesis.

3.Gather data

Process:

Page 9: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

1.We write a null hypothesis: the null hypothesis is the boring (“status-quo”) hypothesis that we want to show is unlikely to be true given our data.

2.The alternative hypothesis is our research question. We are hoping to reject the null hypothesis in favor of the alternative hypothesis.

3.Gather data4.Do stats (to determine whether we can

reject the null hypothesis)

Process:

Page 10: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Do Stats

Can we reject the null hypothesis?

Method: 1. Assume the null hypothesis is true. 2. Calculate the probability of getting results as

(or more) extreme than the data given that null hypothesis is true.

3. If we are unlikely (usually use less than 5% probability) to get these extreme results, then we reject the null-hypothesis. Otherwise we do not reject it.

Page 11: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Note: This method only works one-way.

• If we reject the null hypothesis than we claim that the alternative hypothesis is true (this is what researchers want the result to be).

• If we do NOT reject the null hypothesis we CANNOT claim anything.

Page 12: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

2. Calculating the probability of getting results as (or more) extreme than the data given that null hypothesis is true.

-this probability is the p-value! (which you all know since we memorized it for the last exam).

In other words: are our results different enough from what we would expect (assuming null hypothesis is true) to conclude that the null hypothesis is not true?

Page 13: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Example: (Investigation 1) – Are babies more likely to pick the “good” toy then the “bad” toy after watching a video?

Null Hypothesis

State the null hypothesis in english (no numbers or symbols):

(class)

State the null hypothesis mathematically:

(class)

Page 14: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Example: (Investigation 1) – Are babies more likely to pick the “good” toy then the “bad” toy after watching a video?

Null Hypothesis

State the null hypothesis in english (no numbers or symbols):

The video doesn’t affect the baby’s choice. Baby is equally likely to pick either toy.

State the null hypothesis mathematically:

H_0: p=0.5 (p is the probability of choosing the good toy)

Page 15: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Example: (Investigation 1) – Are babies more likely to pick the “good” toy then the “bad” toy after watching a video?

Alternative Hypothesis

State the alternative hypothesis in english (no numbers or symbols):

class

State the alternative hypothesis mathematically:

class

Page 16: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Example: (Investigation 1) – Are babies more likely to pick the “good” toy then the “bad” toy after watching a video?

Alternative Hypothesis

State the alternative hypothesis in english (no numbers or symbols):

The video does affect the baby’s choice. Baby is more likely to pick the good toy.

State the alternative hypothesis mathematically:

H_a: p>0.5

(when would we use not equal??)

Page 17: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Data: We collected data on 16 babies and found that 14 of them picked the “good” toy.

When calculating the p-value what is our parameter?1. A mean2. The difference between two means3. A proportion4. The difference between two proportions5. Your mom

Page 18: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Data: We collected data on 16 babies and found that 14 of them picked the “good” toy.

When calculating the p-value what is our parameter?1. A mean2. The difference between two means3. A proportion4. The difference between two proportions5. Your mom

*we could think of it as a mean – the number of babies picking the good toy,

or the proportion of babies who pick the good toy.

Page 19: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Data: We collected data on 16 babies and found that 14 of them picked the “good” toy.

How do we find the p-value??

1. Use a z-statistic??2. Use a t-statistic??3. Use the applet (or another simulation)??4. Calculate the exact probability??

Why??

Page 20: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Data: We collected data on 16 babies and found that 14 of them picked the “good” toy.

How do we find the p-value??

1. Use a z-statistic??2. Use a t-statistic??3. Use the applet (or another simulation)?? –OK

but only gives us an approximation4. Calculate the exact probability?? This gives us

the exact p-value for this problem. But how do we do this??

Why??

Page 21: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

3. Use the applet (or another simulation) to approximate the p-value

• Flip a fair coin 16 times.• Did we get 14, 15, 16 heads? (this is “as or

more extreme than the data”)• Repeat this process MANY times. What

proportion of times did we get these extreme results (14,15,16 heads)

Page 22: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Simulation results with 1000 trials of 16 flips Heads

Frequ.

0 0

1 0

2 0

3 4

4 30

5 67

6 120

7 180

8 202

9 188

10 119

11 50

12 20

13 15

14 3

15 2

16 0histogram

Page 23: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

( number of times we flipped 14 Heads PLUS

number of times we flipped 15 HeadsPLUS

number of times we flipped 16 Heads)

divided by total number of trials

(3+2+0)/1000=5/1000=.005

P-value is approximately:

Page 24: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

( number of times we flipped 14 Heads PLUS

number of times we flipped 15 HeadsPLUS

number of times we flipped 16 Heads)

divided by total number of flips

(3+2+0)/1000=5/1000=.005

P-value is approximately:

There is (approximately) a 0.005 chance (0.5%) that we would get 14 or more Heads if the null hypothesis is true. VERY UNLIKELY. So we reject the null hypothesis and conclude that the alternative hypothesis is true.

The area of the right 3 rectangles ->

Page 25: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

4. Calculate the exact probability.

How??

Page 26: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Calculate the exact probability.

P-value=P(14 Heads)+P(15 Heads)+P(16 Heads)

How do we calculate this?

Page 27: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Calculate the exact probability.

P-value=P(14 Heads)+P(15 Heads)+P(16 Heads)

How do we calculate this?

Binomial Theorem!!

Page 28: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Now:

What if we collected data on 100 babies (instead of 16)??

What would change??

Page 29: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Data: We collected data on 100 babies and found that 61 of them picked the “good” toy.

How do we find the p-value??

1. Use a z-statistic??2. Use a t-statistic??3. Use the applet (or another simulation)??4. Calculate the exact probability??

Why??

Page 30: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Data: We collected data on 100 babies and found that 61 of them picked the “good” toy.

How do we find the p-value??

1.Use a z-statistic??2. Use a t-statistic??3. Use the applet (or another simulation)??4. Calculate the exact probability??

(3) and (4): this gets tougher as our sample size (n) gets larger.

Page 31: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

“Exact” Probabilities

• For n large (np>15 and nq>15 ish) this looks like normal curve.

• So if we transform it into a “Standard Normal”, we can use the Normal Table to approximate the area (p-value)

Page 32: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

How do we transform a Normal Distribution with mean μ and standard deviation into a standard normal??

What is the mean and standard deviation of a standard normal?

Page 33: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

How do we transform a Normal Distribution with mean μ and standard deviation into a standard normal??

What is the mean and standard deviation of a standard normal?

Find the z-score (number of standard deviations larger than the mean).

Standard Normal has mean 0 and standard deviation 1.

Page 34: { Statistics Review One Semester in 50 minutes. Setting up a null- hypothesis and finding the p-value

Z-score on board