5. Hypothesis Test_1 Population

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 64

Hypothesis Testing

Dr. Shraddha Mishra


IMI, New Delhi
Hypothesis Tests
Developing Null and Alternative Hypotheses

Type I and Type II Errors

Population Mean: σ Known

Population Mean: σ Unknown

Population Proportion

Calculating the Probability of Type II Errors


Hypothesis Testing
Hypothesis testing can be used to determine whether a statement about the value of a population parameter should or
should not be rejected.

 The null hypothesis, denoted by H0 , is a tentative assumption about a population parameter.


It states that the “null” condition exists; that is, there is nothing new happening, the old theory is still true, the
old standard is correct, and the system is in control.

 The alternative hypothesis, denoted by Ha, is the opposite of what is stated in the null hypothesis.
It states that the new theory is true, there are new standards, the system is out of control, and/or something is
happening .

The hypothesis testing procedure uses data from a sample to test the two competing statements indicated by H0 and Ha.
Developing Null and Alternative Hypotheses

• It is not always obvious how the null and alternative hypotheses should be formulated.
• Care must be taken to structure the hypotheses appropriately so that the test conclusion
provides the information the researcher wants.
• The context of the situation is very important in determining how the hypotheses should
be stated.
• In some cases, it is easier to identify the alternative hypothesis first. In other cases, the
null is easier.
• Correct hypothesis formulation will take practice.
Developing Null and Alternative Hypotheses
Alternative Hypothesis as a Research Hypothesis

• Many applications of hypothesis testing involve an attempt to gather evidence in


support of a research hypothesis.
• In such cases, it is often best to begin with the alternative hypothesis and make it the
conclusion that the researcher hopes to support.
• The conclusion that the research hypothesis is true is made if the sample data provides
sufficient evidence to show that the null hypothesis can be rejected.
• Successful companies stay competitive by developing new products, new methods, new
systems, and the like, that are better than what is currently available. Before adopting
something new, it is desirable to conduct research to determine if there is statistical
support for the conclusion that the new approach is indeed better. In such cases, the
research hypothesis is stated as the alternative hypothesis.
Developing Null and Alternative Hypotheses
Example: A new teaching method is developed that is believed to be better than the current method.
Null Hypothesis: The new method is no better than the old method.
Alternative Hypothesis: The new teaching method is better.

Example: A new sales force bonus plan is developed in an attempt to increase sales.
Null Hypothesis: The new bonus plan will not increase sales.
Alternative Hypothesis: The new bonus plan will increase sales.

Example: A new drug is developed with the goal of lowering blood pressure more than the existing
drug.
Null Hypothesis: The new drug does not lower blood pressure more than the
existing drug.
Alternative Hypothesis: The new drug lowers blood pressure more than the existing
drug.
In each case, rejection of null hypothesis, Ho, provides statistical support for the research hypothesis.
Developing Null and Alternative Hypotheses
Null Hypothesis as an Assumption to be Challenged
• Not all hypothesis tests involve research hypotheses.
• We might begin with a belief or assumption that a statement about the value of a
population parameter is true.
• We then use a hypothesis test to challenge the assumption and determine if there
is statistical evidence to conclude that the assumption is incorrect.
• In these situations, it is helpful to develop the null hypothesis first.

Example: The label on a soft drink bottle states that it contains 67.6 fluid ounces.
Summary of Forms for Null and Alternative Hypotheses
• The equality part of the hypotheses always appears in the null
hypothesis.
• In general, a hypothesis test about the value of a population mean μ
must take one of the following three forms (where μ0 is the
hypothesized value of the population mean).
Null and Alternative Hypotheses
Example: Metro EMS

A major west coast city provides one of the most comprehensive emergency medical
services in the world. Operating in a multiple hospital system with approximately 20 mobile
medical units, the service goal is to respond to medical emergencies with a mean time of 12
minutes or less.

The director of medical services wants to formulate a hypothesis test that could use a
sample of emergency response times to determine whether or not the service goal of 12
minutes or less is being achieved.
Solution
Steps of Hypothesis Testing
Step 1: Develop the null and alternative hypotheses.

Step 2: Specify the margin of error or level of significance α and hence


confidence level of the test

Step 3: Collect evidence or sample data, compute the sample statistic, and then
test statistic like Z (standard normal variate) or t (Student’s t) etc.

Step 4: Decide to reject or accept null hypothesis based on decision rule


• p-value approach or
• critical value approach
Possible Outcomes of Hypothesis Tests
• A hypothesis is either true or false, and you may fail to reject it or you may
reject it on the basis of information:
Trial testimony and evidence
Sample data
Limitation of working with sample is that we cannot be 100% confident about
our decisions. But we can be reasonably confident (90%, 95%, 98%, or 99%) if
we can optimally minimize the chances of error to 10%, 5%, 2% or 1%
respectively.
Possible Outcomes of Hypothesis Tests
• There are two possible states of nature:
H0 is true
H0 is false
• There are two possible decisions:
Fail to reject H0 as it is true
Reject H0 as it is false
Possible Outcomes of Hypothesis Tests
• A decision may be correct in two ways:
Fail to reject a true H0
Reject a false H0
• A decision may be incorrect in two ways:
Reject a true H0
Fail to reject a false H0
Type I and Type II Errors
Type-I Error: Reject a true H0
• A Type-I error is probability of rejecting H0 when it is true.
• The Probability of a Type I error is denoted by α.
• α is called the level of significance of the test
• (1- α) is the probability of accepting H0 when it is true is confidence level
• In practice, the person responsible for hypothesis test specifies the level of
significance α. By selecting α, that person is controlling the probability of
making a Type I error. If the cost of making a Type I error is high, small values
of α are preferred. If the cost of making a Type I error is not too high, larger
values of α are typically used.
Type-II Error: Fail to reject a false H0
• A Type-II error is probability of accepting H0 when it is false.
• The Probability of a Type-II error is denoted by β.
• The complement of β, (1 – β) is the probability of rejecting H0 when it is false
called the “power of the test”.
Type I and Type II Errors
General Rule to select
Type I error and Type II error

• Cases where Type-I error is more costly, we choose a small value of α, e.g.,
1%

• Cases where Type-II error is more costly, we keep large value of α, e.g., 10%

• Cases where we are not able to determine which type of error is more costly,
or if the costs are roughly equal or if we do not have much knowledge about
the relative costs of the two types of errors, we will keep α = 5%
Example: Type I and Type II errors
An automobile currently attains a fuel efficiency of 20 kms per litre in city driving. A product research group has
developed a new fuel injection system designed to increase the kms per litre rating. The group will run controlled tests with
the new fuel injection system looking for statistical support for the conclusion that the new fuel injection system provides
more kms per litre than the current system.

Several new fuel injection units will be manufactured, installed in test automobiles, and subjected to research-controlled
driving conditions. The sample mean miles per litre for these automobiles will be computed and used in hypothesis test to
determine if it can be concluded that the new system provides more than 20 kms per litre.

So, Null Hypothesis , Ho: µ ≤ 20


Alternative hypothesis, Ha : µ > 20 (research
hypothesis)
Analysis: If the sample results lead to the conclusion to reject Ho, the inference can be made that, Ha : µ > 20 is true. The
researchers have the statistical support to state that the new fuel injection system increases the mean number of kms per
litre. The production of automobiles with new fuel injection system should be considered.. However, if the sample results
lead to the conclusion that Ho cannot be rejected, the researchers can not conclude that the new fuel injection system is
better than the current system. So, production of automobiles with the new fuel injection system can not be justified.
Perhaps more research and further testing can be conducted.
Type I Error: concluding that the fuel injection system improves mileage when in fact the new system is not any better than
the current system.
Type II error: Concluding that the new system is not any better than the current system when in fact it improves mileage
Problem 1: The manager of the Danvers-Hilton Resort Hotel stated that the mean guest bill for a weekend is $600 or
less. A member of the hotel's accounting staff noticed that the total charges for guest bills have been increasing in
recent months. The accountant will use a sample of future weekend guest bills to test the manager's claim.

a) Which form of the hypotheses should be used to test the manager's claim? Explain.
H0: μ ≥ 600 H0: μ ≤ 600 H0: μ = 600
Ha: μ < 600 Ha: μ > 600 Ha: μ ≠ 600

b) What conclusion is appropriate when H0 cannot be rejected?

c) What conclusion is appropriate when H0 can be rejected?


Problem 2. Because of high production-changeover time and costs, a director of manufacturing must convince
management that a proposed manufacturing method reduces costs before the new method can be
implemented. The current production method operates with a mean cost of $220 per hour. A research study
will measure the cost of the new method over a sample production period.

a) Develop the null and alternative hypotheses most appropriate for this study.

b) Comment on the conclusion when Ho cannot be rejected.

c) Comment on the conclusion when Ho can be rejected.


d) What is the Type I error in this situation? What are the consequences of making this error?

e) What is the Type II error in this situation? What are the consequences of making this error?
Problems on hypothesis formulation and
Type I and Type II errors

Microsoft Word
Document
Test Statistic
• The null hypothesis H0 is accepted or rejected on the basis of a ‘Test Statistic’

• A test statistic is a sample statistic computed from sample data.The value of


the test statistic is used in determining whether or not we may reject the null
hypothesis.

• For Population Mean test, z- test statistic or t-test statistic is used depending on
the knowledge of population standard deviation
Test Population Mean
Cases in which the test statistic is Z

Sigma is known and the population is normal.


Sigma unknown but s is known and the sample size is at least 30. (The
population need not be normal, will approach to normal by CLT)

The formula
The formula for forcalculatin
calculatingg ZZ isis::
xx 

zz 
  
 n
 n
Test Population Mean
Cases in which the test statistic is t

Sigma is unknown but the sample standard deviation s is known, and the
population is normal.

The formula
The formula for forcalculatin
calculatingg ttisis::
xx  

tt 
 ss 
 n
 n 
Exercise 8.3 (8.19)

• If our goal is to accept a null hypothesis that µ=36.5 with 96% certainty when it’s
true, and our sample size is 50, diagram the acceptance and rejection regions for
the following alternative hypotheses.
(a) µ≠36.5
(b) µ>36.5
(C) µ<36.5
p-Value Approach to One-Tailed Hypothesis Testing
• The p-value is the probability, computed using the test statistic, that measures the
support (or lack of support) provided by the sample for the null hypothesis.
• If the p-value is less than or equal to the level of significance α, the value of the test
statistic is in the rejection region.

• Reject H0, if the p-value ≤ α


Fail to reject H0, if the p-value > α
• For two tailed test, double the tail area to obtain the p –value.
• Smaller the p-value, the stronger the evidence that you should reject the null hypothesis.
This is known as statistically significant test
Suggested Guidelines for Interpreting p-Values
• Less than 0.01: Overwhelming evidence to conclude Ha is true (Reject H0).

• Between 0.01 and 0.05: Strong evidence to conclude Ha is true (Reject H0)

• Between .05 and .10: Weak evidence to conclude Ha is true (Fail to reject H0)

• Greater than .10: Insufficient evidence to conclude Ha is true. (Fail to reject H0)

 When the p-value is smaller than 0.01, the result is considered to be


very significant.
 When the p-value is between 0.01 and 0.05, the result is considered to
be significant.
 When the p-value is between 0.05 and 0.10, the result is considered by
some as marginally significant (and by most as not significant).

Lower-Tailed Test About a Population Mean: σ Known
p-Value Approach
Lower-Tailed Test About a Population Mean: σ Known
Critical Value Approach
Upper-Tailed Test About a Population Mean: σ Known
p-Value Approach
Upper-Tailed Test About a Population Mean: σ Known
Critical Value Approach
Critical Value Approach to One-Tailed Hypothesis Testing
• The test statistic has a standard normal probability distribution.
• We can use the standard normal probability distribution table to find the -value with an
area of α in the lower (or upper) tail of the distribution.
• The value of the test statistic that established the boundary of the rejection region is
called the critical value for the test.
• The rejection rule is:
• Lower tail: Reject H0 if ≤ –α
• Upper tail: Reject H0 if ≥ α
One-Tailed Tests About a Population Mean: σ Known
Example: Metro EMS

The response times for a random sample of 40 medical emergencies were tabulated. The
sample mean is 13.25 minutes. The population standard deviation is believed to be 3.2
minutes.

The EMS director wants to perform a hypothesis test, with a .05 level of significance, to
determine whether the service goal of 12 minutes or less is being achieved.
One-Tailed Tests About a Population Mean: σ Known

1. Develop the hypotheses.

2. Specify the level of significance. α = .05

3. Compute the value of the test statistic.


One-Tailed Tests About a Population Mean: σ Known
p –Value Approach
4. Compute the p –value.

For z = 2.47, the cumulative probability is 0.9932.


p-value = 1 – 0.9932 = 0.0068

5. Determine whether to reject H0.


Because p-value = 0.0068 ≤ α = 0.05, we reject H0.
There is sufficient statistical evidence to infer that Metro EMS is not meeting the
response goal of 12 minutes.
One-Tailed Tests About a Population Mean: σ Known
p –Value Approach
One-Tailed Tests About a Population Mean: σ Known
Critical Value Approach
p-Value Approach to Two-Tailed Hypothesis Testing
• Compute the p-value using the following three steps:
1. Compute the value of the test statistic .
2. If is in the upper tail ( > 0), compute the probability that is greater than or equal to
the value of the test statistic. If is in the lower tail ( < 0), compute the probability that
is less than or equal to the value of the test statistic.
3. Double the tail area obtained in step 2 to obtain the p-value.

• The rejection rule: Reject H0 if the p-value ≤ α.


Critical Value Approach to Two-Tailed Hypothesis Testing
• The critical values will occur in both the lower and upper tails of the
standard normal curve.
• Use the standard normal probability distribution table to find α/2 (the -
value with an area of α/2 in the upper tail of the distribution).
• The rejection rule is:
Critical Region for two tailed test
When α = 5%
f(z)
Critical Region Critical Region

Acceptance
0.025% Region 0.025%
Total = 5% Level
95%

-z0.05/2 = -1.96 0 z0.05/2 = 1.96 z

Critical Point Critical Point


Summary: Critical Value Approach

The rejection rule is:


• Lower tail test:
H 0:    0
H a:   0
Reject H0 if z < -z
• Upper tail test:
H 0:    0
H a:   0
Reject H0 if z > z
• Two tail test:
H 0:    0
H a:   0
Reject H0 if z < -z/2 or
z > z/2.
Example: Glow Toothpaste
The production line for Glow toothpaste is designed to fill tubes with a mean weight of 6 oz.
Periodically, a sample of 30 tubes will be selected in order to check the filling process.
Quality assurance procedures call for the continuation of the filling process if the sample
results are consistent with the assumption that the mean filling weight for the population of
toothpaste tubes is 6 oz.; otherwise the process will be adjusted.
Assume that a sample of 30 toothpaste tubes provides a sample mean of 6.1 oz. The
population standard deviation is believed to be 0.2 oz.
Perform a hypothesis test, at the 0.03 level of significance, to help determine whether the
filling process should continue operating or be stopped and corrected.
Two-Tailed Tests About a Population Mean: σ Known

1. Develop the hypotheses.

2. Specify the level of significance. α = 0.03

3. Compute the value of the test statistic.


Two-Tailed Tests About a Population Mean: σ Known
p –Value Approach
4. Compute the p –value.

For z = 2.74, the cumulative probability is 0.9969.


p-value = 2(1 – 0.9969) = 0.0062

5. Determine whether to reject H0.


Because p-value = 0.0062 ≤ α = 0.03, we reject H0.
There is sufficient statistical evidence to infer that the alternative hypothesis is true
(i.e. the mean filling weight is not 6 ounces).
Two-Tailed Tests About a Population Mean: σ Known
p-Value Approach
Two-Tailed Tests About a Population Mean: σ Known

Critical Value Approach


4. Determine the critical value and the rejection rule.

There is sufficient statistical evidence to infer that the alternative hypothesis is


true (i.e. the mean filling weight is not 6 ounes).
Two-Tailed Tests About a Population Mean: σ Known
Critical Value Approach
Confidence Interval Approach to Two-Tailed Tests About a Population Mean

• Select a simple random sample from the population and use the value of the
sample meanto develop the confidence interval for the population mean μ.

• If the confidence interval contains the hypothesized value μ0, do not reject H0.
Otherwise, reject H0. (Actually, H0 should be rejected if μ0 happens to be equal to
one of the end points of the confidence interval.)
Confidence Interval Approach to Two-Tailed Tests About a Population Mean

The 97% confidence interval for μ is

Because the hypothesized value for the population mean, μ0 = 6, is not in this
interval, the hypothesis-testing conclusion is that the null hypothesis, H0: μ = 6,
can be rejected.
8.33
The bay city Bigleaguers, a semiprofessional baseball team, have the player who led
the league in batting average for many years. For the past several years, Joe Carver’s
batting average has had a mean of .343 and a standard deviation of .018. This year,
however, Joe’s average was only .306.

Joe is renegotiating his contract for the next year, and the salary he will be able to
obtain is highly dependent on his ability to convince the team’s owner that his batting
average this year was not significantly worse than the previous years. If the owner is
willing to use a 0.02 significance level, will Joe’s salary be cut next year?
Hypothesis Testing: σ Unknown
Example: Highway Patrol
One-Tailed Test About a Population Mean: σ Unknown

A State Highway Patrol periodically samples vehicle speeds at various locations on a


particular roadway. The sample of vehicle speeds is used to test the hypothesis H0: μ ≤ 65.

The locations where H0 is rejected are deemed the best locations for radar traps. At
Location F, a sample of 64 vehicles shows a mean speed of 66.2 mph with a standard
deviation of 4.2 mph. Use α = 0.05 to test the hypothesis.
Hypothesis Tests About a Population Mean when σ unknown

Rejection Rule: p -Value Approach


Reject H0 if p –value < a
Rejection Rule: Critical Value
Approach
H0: Reject H0 if t < -t

H0:  Reject H0 if t > t

H0: Reject
 H0 if t < - t or t > t
Note: critical value approach is advisable in case of t-test statistic to avoid complications as exact
p-value is not available. Hence, an approximation or interpolation is required to obtain p-value.
One-Tailed Test About a Population Mean: σ Unknown

1. Develop the hypotheses.

2. Specify the level of significance. α = .05

3. Compute the value of the test statistic.


One-Tailed Test About a Population Mean: σ Unknown
p –Value Approach
4. Compute the p –value.

5. Determine whether to reject H0.


Because p-value < α = 0.05, we reject H0.
We are at least 95% confident that the mean speed of vehicles at Location F is
greater than 65 mph.
One-Tailed Test About a Population Mean: σ Unknown
Critical Value Approach
4. Determine the critical value and the rejection rule.

5. Determine whether to reject H0.


Because 2.286 ≥ 1.669, we reject H0.
We are at least 95% confident that the mean speed of vehicles at Location F is
greater than 65 mph. Location F is a good candidate for a radar trap.
One-Tailed Test About a Population Mean: σ Unknown
A Summary of Forms for Null and Alternative Hypotheses About a
Population Proportion
• The equality part of the hypotheses always appears in the null
hypothesis.
• In general, a hypothesis test about the value of a population
proportion must take one of the following three forms (where 0 is the
hypothesized value of the population proportion).
Tests About a Population Proportion
Test Statistic:
Tests About a Population Proportion
• Rejection Rule: p –Value Approach

Reject H0 if p –value ≤ α

• Rejection Rule: Critical Value Approach


HypothesisTest About a Population Proportion
Example: National Safety Council (NSC)

For a Christmas and New Year’s week, the National Safety Council estimated that 500 people
would be killed and 25,000 injured on the nation’s roads. The NSC claimed that 50% of the
accidents would be caused by drunk driving.

A sample of 120 accidents showed that 67 were caused by drunk driving. Use these data to
test the NSC’s claim with α = 0.05.
Two-Tailed Test About a Population Proportion
Two-Tailed Test About a Population Proportion
p –Value Approach
4. Compute the p –value.

For z = 1.28, the cumulative probability = 0.8997.


p-value = 2(1 – 0.8997) = 0.2006.

5. Determine whether to reject H0.


Because p-value = 0.2006 > α = 0.05, we cannot reject H0.
We do not have convincing evidence that the true proportion of accidents that would
be caused by drunk driving is different than 50%.
Two-Tailed Test About a Population Proportion
Critical Value Approach
4. Determine the critical value and the rejection rule.

5. Determine whether to reject H0.


Because 1.278 is not less than 1.96 and is not greater than 1.96, we cannot reject
H0 .
We do not have convincing evidence that the true proportion of accidents that
would be caused by drunk driving is different than 50%.

You might also like