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

Preview:

Citation preview

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

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?

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.

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:

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:

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:

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:

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.

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.

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?

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)

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)

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

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

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

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.

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

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

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)

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

( 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:

( 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 ->

4. Calculate the exact probability.

How??

Calculate the exact probability.

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

How do we calculate this?

Calculate the exact probability.

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

How do we calculate this?

Binomial Theorem!!

Now:

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

What would change??

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

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.

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

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?

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.

Z-score on board

Recommended