36
Hypothesis Tests One Sample Proportion

Hypothesis Tests Hypothesis Tests One Sample Proportion

Embed Size (px)

Citation preview

Page 1: Hypothesis Tests Hypothesis Tests One Sample Proportion

Hypothesis Tests

One Sample Proportion

Page 2: Hypothesis Tests Hypothesis Tests One Sample Proportion

What is hypothesis testing?• A statistical hypothesis is an assumption about a

population parameter. This assumption may or may not be true.

• The best way to determine whether a statistical hypothesis is true would be to examine the entire population. Since that is often impractical, researchers typically examine a random sample from the population.

• If sample data are consistent with the statistical hypothesis, the hypothesis is accepted; if not, it is rejected.

Page 3: Hypothesis Tests Hypothesis Tests One Sample Proportion

Types of questions we can answer…

• Has the president’s approval rating changed since last month?

• Has teenage smoking decreased in the past five years?

• Is the global temperature increasing?• Did the Super Bowl ad we bought actually

increase sales?To answer such questions, we test hypotheses

about models.

Page 4: Hypothesis Tests Hypothesis Tests One Sample Proportion

A government agency has received numerous complaints that a particular restaurant has been selling underweight hamburgers. The restaurant advertises that it’s patties are “a quarter pound” (4 ounces).

How can I tell if they really are

underweight?

Take a sample & find x.

But how do I know if this x is one that I expect to happen or is

it one that is unlikely to happen?

Hypothesis test will help me decide!

Page 5: Hypothesis Tests Hypothesis Tests One Sample Proportion

What are hypothesis tests?Calculations that tell us if a value occurs by random chance or not – if it is statistically significantIs it . . .–a random occurrence due to variation?–a biased occurrence due to some other reason?

Page 6: Hypothesis Tests Hypothesis Tests One Sample Proportion

Nature of hypothesis tests -• First begin by supposing the “effect” is NOT present• Next, see if data provides evidence against the supposition

Example: murder trial

How does a murder trial work?

First - assume that the person is innocentThen – must have

sufficient evidence to prove guiltyHmmmmm …

Hypothesis tests use the same

process!

Page 7: Hypothesis Tests Hypothesis Tests One Sample Proportion

Nonstatistical Hypothesis Testing…

• A criminal trial is an example of hypothesis testing without the statistics.

• In a trial a jury must decide between two hypotheses. The null hypothesis is

The defendant is innocent• The alternative hypothesis or research hypothesis is

The defendant is guilty• The jury does not know which hypothesis is true. They must

make a decision on the basis of evidence presented.

Page 8: Hypothesis Tests Hypothesis Tests One Sample Proportion

Nonstatistical Hypothesis Testing…• In the language of statistics convicting the defendant is

called rejecting the null hypothesis in favor of the alternative hypothesis. That is, the jury is saying that there is enough evidence to conclude that the defendant is guilty (i.e., there is enough evidence to support the alternative hypothesis).

• If the jury acquits it is stating that there is not enough evidence to support the alternative hypothesis. Notice that the jury is not saying that the defendant is innocent, only that there is not enough evidence to support the alternative hypothesis. That is why we never say that we accept the null hypothesis.

Page 9: Hypothesis Tests Hypothesis Tests One Sample Proportion

Steps:

1)Hypothesis statements & define parameters

2)Assumptions3)Calculations4)Conclusion, in context

Notice the steps are the same except we

add hypothesis statements – which

you will learn today

Page 10: Hypothesis Tests Hypothesis Tests One Sample Proportion

Writing Hypothesis statements:• Null hypothesis – is the statement being tested; this is a statement of “no effect” or “no difference”

• Alternative hypothesis – is the statement that we suspect is true

H0:

Ha:

Page 11: Hypothesis Tests Hypothesis Tests One Sample Proportion

The form:Null hypothesis H0: parameter = hypothesized value

Alternative hypothesis Ha: parameter > hypothesized value Ha: parameter < hypothesized value Ha: parameter = hypothesized value

Page 12: Hypothesis Tests Hypothesis Tests One Sample Proportion

Hypotheses for proportions:

H0: p = value

Ha: p > value

where p is the true proportion of context

Use >, <, or ≠

Page 13: Hypothesis Tests Hypothesis Tests One Sample Proportion

A large city’s Department of Motor Vehicles claimed that 80% of candidates pass driving tests, but a newspaper reporter’s survey of 90 randomly selected local teens who had taken the test found only 61 who passed. I’ll assume that the passing rate for teenagers is the same as the DMV’s overall rate of 80%, unless there’s strong evidence that it’s lower.

State the hypotheses :

Where p is the true proportion of teenagers that pass the driving test

H0: p = .8

Ha: p < .8

Page 14: Hypothesis Tests Hypothesis Tests One Sample Proportion

A government agency has received numerous complaints that a particular restaurant has been selling underweight hamburgers. The restaurant advertises that it’s patties are “a quarter pound” (4 ounces).

State the hypotheses :

Where 𝜇 is the true mean weight of hamburger patties

H0: 𝜇 = 4Ha: 𝜇 < 4

Page 15: Hypothesis Tests Hypothesis Tests One Sample Proportion

A car dealer advertises that is new subcompact models get 47 mpg. You suspect the mileage might be overrated.

State the hypotheses :

Where 𝜇 is the true mean mpg

H0: 𝜇 = 47Ha: 𝜇 < 47

Page 16: Hypothesis Tests Hypothesis Tests One Sample Proportion

Many older homes have electrical systems that use fuses rather than circuit breakers. A manufacturer of 40-A fuses wants to make sure that the mean amperage at which its fuses burn out is in fact 40. If the mean amperage is lower than 40, customers will complain because the fuses require replacement too often. If the amperage is higher than 40, the manufacturer might be liable for damage to an electrical system due to fuse malfunction. State the hypotheses :

Where 𝜇 is the true mean amperage of the fuses

H0: 𝜇 = 40Ha: 𝜇 = 40

Page 17: Hypothesis Tests Hypothesis Tests One Sample Proportion

Activity: For each pair of hypotheses, indicate which are not legitimate & explain why

a) H0 : 15; Ha : 15

b) H0 : x 123; Ha : x 123

c) H0 : p .1; Ha : p .1

d) H0 : .4; Ha : .6

e) H0 : 0; Ha : 0

Must use parameter (population)

x is a statistics (sample)

p is the population proportion!

Must use same number as H0! rho is parameter for population correlation

coefficient – but H0 MUST be “=“ !

Must be NOT equal!

Page 18: Hypothesis Tests Hypothesis Tests One Sample Proportion

The Reasoning of Hypothesis Testing

2. AssumptionsAll models require assumptions, so state the assumptions and check any corresponding conditions.• Assumptions are the same for the corresponding confidence

interval.– Your plan should end with a statement like• Because the conditions are satisfied, I can model the

sampling distribution of the proportion with a Normal model and….

• Watch out, though. It might be the case that your model step ends with “Because the conditions are not satisfied, I can’t proceed with the text.” If that’s the case, stop and reconsider.

Page 19: Hypothesis Tests Hypothesis Tests One Sample Proportion

The Reasoning of Hypothesis Testing (cont.)

2. Assumptions– Each test we discuss in this class has a name that

you should include in your report.– The test about proportions is called a one-proportion z-test.

Page 20: Hypothesis Tests Hypothesis Tests One Sample Proportion

A large city’s DMV claimed that 80% of candidates pass driving tests. A reporter has results from a

survey of 90 randomly selected local teens who had taken the test.

Are the conditions for inference satisfied?• The 90 teens surveyed were a random sample of

local teenage driving candidates.• 90(.80)≥10 and 90(.20)≥10 72≥10 and 18≥10• The population of the teenagers who take driving

test in a large city would be at least 10(90) = 900.• The conditions are satisfied, so it’s okay to use a

normal distribution and perform a one-proportion z-test.

Page 21: Hypothesis Tests Hypothesis Tests One Sample Proportion

The Reasoning of Hypothesis Testing (cont.)

3. Calculations– Under “calculations” we place the actual

calculation of our test statistic from the data.– Different tests will have different formulas and

different test statistics.

Page 22: Hypothesis Tests Hypothesis Tests One Sample Proportion

The Reasoning of Hypothesis Testing (cont.)

3. Calculations– The ultimate goal of the calculation is to obtain a

P-value.• The P-value is the probability that the observed

statistic value (or an even more extreme value) could occur if the null model were correct.

• If the P-value is small enough, we’ll reject the null hypothesis.

• Note: The P-value is a conditional probability—it’s the probability that the observed results could have happened if the null hypothesis is true.

Page 23: Hypothesis Tests Hypothesis Tests One Sample Proportion

P-values -

• The probability that the test statistic would have a value as extreme or more than what is actually observedIn other words . . . is it far out in the

tails of the distribution?

Page 24: Hypothesis Tests Hypothesis Tests One Sample Proportion

Formula for hypothesis test:

statistic of SD

parameter - statisticstatisticTest

z npp

pp

1

ˆ

Page 25: Hypothesis Tests Hypothesis Tests One Sample Proportion

A large city’s DMV claimed that 80% of candidates pass driving tests, but a survey of 90 randomly selected local teens who had taken the test found only 61 who passed.

What’s the P-value for the one-proportion z-test?

• n=90, x=61, and a hypothesized p=.80

pµ61

90.678

p .8(.2)

90.042

z .678 .800

.042 2.90

P valueP(z 2.90) .002

P-hat =Do this in your calculator:Select STAT TESTS #5 (1-PropZTest) <enter>

Z-Test Inpt: Data Stats

Po: _____ x: _____

n: _____ prop po <po >po Calculate Draw

Page 26: Hypothesis Tests Hypothesis Tests One Sample Proportion

The Reasoning of Hypothesis Testing (cont.)

4. Conclusion– The conclusion in a hypothesis test is always a

statement about the null hypothesis. – The conclusion must state either that we reject

or that we fail to reject the null hypothesis.– And, as always, the conclusion should be stated

in context.

Page 27: Hypothesis Tests Hypothesis Tests One Sample Proportion

The Reasoning of Hypothesis Testing (cont.)

4. Conclusion– Your conclusion about the null hypothesis should

never be the end of a testing procedure.– Often there are actions to take or policies to

change.

Page 28: Hypothesis Tests Hypothesis Tests One Sample Proportion

Statistically significant - • In statistics, a result is called

statistically significant if it is unlikely to have occurred by chance.

• What constitutes “surprisingly”?–We typically use a standard of 5%.

• Denoted by –Can be any value–Usual values: 0.1, 0.05, 0.01–Most common is 0.05

Page 29: Hypothesis Tests Hypothesis Tests One Sample Proportion

Statistically significant –• The p-value is as small or

smaller than the level of significance (𝛼)

• If p > , “fail to reject” the null hypothesis at the 𝛼 level.

• If p < 𝛼, “reject” the null hypothesis at the 𝛼 level.

Page 30: Hypothesis Tests Hypothesis Tests One Sample Proportion

Facts about p-values:• ALWAYS make decision about the

null hypothesis!• Large p-values show support for

the null hypothesis, but never that it is true!

• Small p-values show support that the null is not true.

• Never accept the null hypothesis! but say “we fail to reject the null hypothesis”

Page 31: Hypothesis Tests Hypothesis Tests One Sample Proportion

Never “accept” the null hypothesis!

Never “accept” the null hypothesis!

Never “accept” the null hypothesis!

Page 32: Hypothesis Tests Hypothesis Tests One Sample Proportion

At an 𝛼 level of .05, would you reject or fail to reject H0

for the given p-values?

a)p=.03b)p=.15c)p=.45d)p=.023

Reject

Reject

Fail to rejectFail to reject

Page 33: Hypothesis Tests Hypothesis Tests One Sample Proportion

“Since the p-value < (>) 𝛼, I reject (fail to reject) the H0. There is (is not) sufficient evidence to suggest that Ha.”

Be sure to write Ha in context

(words)!

Page 34: Hypothesis Tests Hypothesis Tests One Sample Proportion

A large city’s DMV claimed that 80% of candidates pass driving tests. Using the P-

value of .002, what do these findings conclude?

• Since the p-value is < α, I reject the H0. There is sufficient evidence to suggest that the passing rate for teenagers taking the driving test is lower than 80%.

Page 35: Hypothesis Tests Hypothesis Tests One Sample Proportion

A company is willing to renew its advertising contract with a local radio station only if the station can prove that more than 20% of the residents of the city have heard the ad and recognize the company’s product. The radio station conducts a random sample of 400 people and finds that 90 have heard the ad and recognize the product. Is this sufficient evidence for the company to

renew its contract?

Page 36: Hypothesis Tests Hypothesis Tests One Sample Proportion

Assumptions:

•Have an SRS of people

•np = 400(.2) = 80 & n(1-p) = 400(.8) = 320 - Since both are greater than 10, this distribution is approximately normal.

•Population of people is at least 4000.

Since the conditions are satisfied, so it’s okay to use a normal distribution and perform a one-proportion z-test.

One Proportion Z-Test

H0: p = .2 where p is the true proportion of people who heard the ad

Ha: p > .2

.05

pµ.225

z .225 .2

.2(.8)

400

1.25 p value.1056

Since the p-value > , I fail to reject the null hypothesis. There is not sufficient evidence to suggest that the true proportion of people who heard the ad is greater than .2.

Use the parameter in the null hypothesis to check assumptions!

Use the parameter in the null hypothesis to calculate standard deviation!