Sei sulla pagina 1di 41

HYPOTHESIS TESTING

TODS201-Statistics for Decision Making


Monsoon Semester - 2019
Amrut Mody School of Management
Hypothesis
 Begins with an assumption called Hypothesis.

 It is really a temporary explanation, a kind of educated guess


about what will happen under certain condition.

 A process that uses sample statistics to test a claim about the


value of a population parameter.
Hypothesis =Assumption
Begins with an
Assume Certain value for a Test the validity Collect the
assumption- about a
population mean of assumption sample data
population parameter

by using this Determine the difference


information between the hypnotized Produce sample
value and the actual value statistics
of the sample mean

Smaller the difference – greater the likelihood


Difference is significant?
larger the difference – smaller the likelihood
Hypothesis Testing
 Hypothesis Testing is a way to gain information about a
population Parameter.
 Procedure for Hypothesis Testing in brief:
1) Make a guess (Hypothesis) about a population parameter
2) Collect sample data
3) Produce Sample Statistics
4) Use this information to decide how likely it is that our
hypothesized population parameter is correct.
Hypothesis Testing
GENERAL PROCEDURE FOR HYPOTHESIS TESTING:
 We must state the hypothesized value of the population parameter before
we begin sampling.
 The assumption we wish to test is called the null hypothesis and is
denoted 𝐻0 (read ‘H sub-zero’ or ‘H-zero’).
 Suppose we wish to test whether the population mean was equal to 500.
We would symbolize it as follows:
“The null hypothesis is that the population mean is equal to 500”:
𝐻0 : 𝜇 = 500
 If we wish to use the hypothesized value of the population mean in a
problem, we would represent it symbolically as 𝜇𝐻0 read as “The
hypothesized value of the population mean”
Hypothesis Testing

 If the conclusion fails to support the null hypothesis, we must


conclude that something else is true.

 Whenever we reject the null hypothesis, the conclusion we do


accept is called the alternative hypothesis and is symbolized
𝐻1 (read ‘H sub-one’)

 Consider the above null hypothesis


𝐻0 : 𝜇 = 200 (Read: “The null hypothesis is that the population
mean is 200”)
Hypothesis Testing

We will consider three alternative hypotheses:


 𝐻1 : 𝜇 ≠ 200 “The alternative hypothesis is that the population mean
is not equal to 200”
 𝐻1 : 𝜇 < 200 “The alternative hypothesis is that the population mean
is less than 200”
 The purpose of hypothesis testing is not to question the computed
value of the sample statistic, but to make a judgement about the
difference between the sample statistic and the hypothesized
population parameter.
Hypothesis Testing
 If we assume that the hypothesis is correct, then the
significance level will indicate the percentage of the sample
means that is outside certain limits.
 This is the opposite of estimation (Chapter 7), the
confidence level in estimation indicates the percentage of
sample means that fell within the defined confidence
limits.
 The figure on the next page indicates how to interpret a 5%
level of significance.
Hypothesis Testing
Hypothesis Testing
 Note that in the previous figure 2.5% of the area is located in each
tail.
 From the table of values of a Gaussian, 95% of all the area under is
included in an interval extending 1.96 𝜎𝑥 on either side of the
hypothesized mean.
 Alternatively, we could say that we would accept 𝐻0 for the
unshaded part of the area under the curve (95% of the area under the
curve) and we would reject 𝐻0 for the two shaded parts of the curve.
 Note that when we say that we ‘accept 𝐻0 ’ it does NOT mean that
𝐻0 is true, it just means we have NO statistical evidence to reject it.
How to select Null and Alternate Hypothesis
 Null Hypothesis H0: Currently accepted value

 Alternate value H1 or Ha: also called research hypothesis which


involves the claim to be tested or some challenger or new person
challenge something then that will be included in the alternate
hypothesis.
Examples of Null and Alternate Hypothesis
Example 1: It is believed that a candy machine makes chocolate
bars that are on average 5g. A worker claims that the machine after
maintenance no longer makes 5g bars. Write H0 and Ha.

Ans. Here it is accepted or well established that machine makes


chocolate bars of 5 grams.
 Someone else (worker) claims that now machine does not make 5
gram chocolate bars. So here challenger or new person is worker.
 H0: 𝜇 = 5 𝑔𝑚 and H1: 𝜇 ≠ 5 𝑔𝑚
Examples of Null and Alternate Hypothesis
Example 2: Doctors believe that the average teen sleeps on average
no longer than 10 hours per day. A researcher believes that teens on
average sleep longer. Write H0 and Ha.

Ans. Here it is accepted or claimed that average teen sleeps on


average no longer than 10 hours per day.
 Someone else (researcher) claims that teens on average sleep
longer. So here challenger or new person is researcher.
 H0: 𝜇 ≤ 10 hours and H1: 𝜇 > 10 ℎ𝑜𝑢𝑟𝑠
Examples of Null and Alternate Hypothesis
Example 3: The school board claims that at least 60% of students
bring a phone to school. A teacher believes this number is too high
and randomly samples 25 students to test a level of significance of
0.02. Write H0 and Ha.
Ans. Here school board claims that at least 60% of students bring a
phone to school.
 Someone else (teacher) believes that this number is too high.
 Here percentage is given so it is the case of proportion.
 H0: p ≥ 0.60 and H1: p < 0.60
More Examples of 𝑯𝟎 & 𝑯𝟏
State the null and alternative hypothesis that would to test
each of the following statements:
1. A manufacturer claims that the average life of a transistor is
at least 1000 hours.
2. A pharmaceutical firm maintains that the average time for a
certain drug to take effect is 15 mins.
3. The mean starting salary of graduates is higher than Rs
50000 per annum.
Examples of 𝑯𝟎 & 𝑯𝟏
CRITICAL REGIONS
 Suppose we test a hypothesis at the 5% level of significance:

 means we will reject the null hypothesis if the difference between


the sample statistic and the hypothesized population parameter
(i.e. 𝑥 − 𝜇𝐻0 ) is so large

 A larger difference would occur (on an average) in only five or


fewer times in every 100 samples when the hypothesized
population parameter is correct.
CRITICAL REGIONS
𝑥 −𝜇𝐻
 The values of the test statistic (in this case ) where we fail to
𝜎
reject 𝐻0 is called the acceptance region

 The values of the test statistic where we reject 𝐻0 in favour of 𝐻𝑎


is called the rejection region

 The rejection region is shaded in the next two slides. The level of
significance of the test is 5%.
CRITICAL REGIONS
CRITICAL REGIONS
CRITICAL REGIONS
Example: The manager of a department store is thinking about establishing a new
billing system for the store’s credit customers. After a thorough financial analysis,
she determines that the new system will be cost-effective only if the mean
monthly account is more than $170. The manager knows that the accounts are
approximately normally distributed with a standard deviation of $65. Can the
manager conclude from this at a significance level of 5% that the new system will
be cost-effective?
Solution:
 To conclude that the system will be cost-effective, requires
to show that the mean account for all customers will be more
than $170. Consequently, this must be the alternate
hypothesis:
𝐻1 : 𝜇 > 170 (𝐼𝑛𝑠𝑡𝑎𝑙𝑙 𝑁𝑒𝑤 𝑆𝑦𝑠𝑡𝑒𝑚)
 If the mean is less than or equal to 170, then the system will
not be cost-effective.
 We test the Null hypothesis
𝐻0 : 𝜇 ≤ 170
 As a result we may convert 𝑥 into the standard normal random
variable and obtain
𝑥−𝜇 𝑥𝐿 −𝜇 𝑥𝐿 −𝜇
𝑃 𝜎 > 𝜎 =𝑃 𝑍> 𝜎 =𝛼
𝑛 𝑛 𝑛

 𝜎 = 65 and 𝑛 = 400, α = 5%
 Suppose the Null hypothesis was true then 𝜇 = 170.
that 𝛼 is 𝑧𝛼 = 𝑧0.5 = 1.645.
𝑥𝐿 −𝜇
 We can now calculate the value of 𝑥𝐿 : 𝜎 = 𝑧𝛼
𝑛

𝑥𝐿 −170
Hence, 65 = 1.645 ⟹ 𝑥𝐿 = 175.34
400

Therefore, the rejection region is 𝑥 > 175.34


 The sample mean was computed to be 178.
 Because the test statistic (sample mean) is in the rejection region (it is
greater than 175.34), i.e. 178 > 175.34, we reject the null hypothesis.

 Thus, there is sufficient evidence to infer that the mean monthly


account is greater than $170.

 What we have determined is that any value of 𝑥 above


175.34 represents an event that is quite unlikely when sampling (with
𝑛 = 400) from a population whose mean is 170 (and whose standard
deviation is 65).
 This suggests that the assumption that the null hypothesis is true is
incorrect, and consequently we reject the null hypothesis in favour of
the alternative hypothesis.
Type I and II Errors
 Type – I Error: It occurs when we reject a null hypothesis when it
is true.
𝑃 𝑇𝑦𝑝𝑒 𝐼 𝐸𝑟𝑟𝑜𝑟 = 𝛼

 Type – II Error: It occurs when we accept a null hypothesis when


it is false.
𝑃 𝑇𝑦𝑝𝑒 𝐼𝐼 𝐸𝑟𝑟𝑜𝑟 = 𝛽
Examples of Type – I and Type – II Errors

Example 1: A large nationwide poll recently showed an unemployment rate of


9% in the US. The mayor of a local town wonders if this national result holds true
for her town, so she plans on taking a sample of her residents to see if the
unemployment rate is significantly different than 9% in her town.
Let p represent the unemployment rate in her town.
H0: p = 0.09 and H1: p ≠ 0.09
Under which of the following conditions would the mayor commit a Type – I error
and Type –II error?
(1) She concludes the town’s unemployment rate is not 9% when it actually is.
(2) She concludes the town’s unemployment rate is not 9% when it actually is not.
(3) She concludes the town’s unemployment rate is 9% when it actually is.
(4) She concludes the town’s unemployment rate is 9% when it actually is not.
Type I and II Errors
Solution:
 Type – I Error: (1)

 Type – II Error: (4)


Examples of Type – I and Type – II Errors

Example 2: A large university is curious if they should build another cafeteria.


They plan to survey a sample of their students to see if there is strong evidence
that the proportion interested in a meal plan is higher than 40%, in which case
they will consider building a new cafeteria.
Let p represent the proportion of students interested in a meal plan.
H0: p ≤ 0.40 and H1: p > 0.40
Under which of the following conditions would the mayor commit a Type – I error
and Type –II error?
(1) They don’t consider building a new cafeteria when they should.
(2) They don’t consider building a new cafeteria when they shouldn’t.
(3) They consider building a new cafeteria when they shouldn’t.
(4) They consider building a new cafeteria when they should.
Type I and II Errors
Solution:
 Type – I Error: (3)

 Type – II Error: (1)


One Tailed
and
Two Tailed Tests
Two Tailed Tests
Example:
 A manufacturer of lightbulbs wants to produce bulbs with a mean lifetime of
𝜇 ≠ 𝜇𝐻0 = 1,000 hours. If the lifetime is shorter he will lose customers to
his competition and if the lifetime is longer, he will have very high
production costs because the filaments will be thicker.
 To check whether the production process is working, he takes a sample of
the output to test the hypothesis
𝐻0 : 𝜇 = 1000.
 Because he does not want to deviate significantly from 1000 ℎ𝑜𝑢𝑟𝑠 in
either direction, the appropriate alternative hypothesis is
𝐻1 : 𝜇 ≠ 1000
and he uses a two-tailed test.
A Two-Tailed test of
hypothesis rejects the null
hypothesis if the sample
mean is significantly higher
than or lower than the
hypothesized sample mean.
Thus in a Two-Tailed test of
hypothesis, there are two
rejection regions.
This is shown in the picture
on the next slide.
A two-tailed test is to be used
when the 𝐻0 : 𝜇 = 𝜇𝐻0 (𝜇𝐻0 is
some specified value),
and the 𝐻1 : 𝜇 ≠ 𝜇𝐻0 .
Right-Tailed Test
Example:
A sales manager has asked her salespeople to observe a limit on travelling
expenses. The manager hopes to keep expenses to a limit of $100 per
salesperson per day. One month after the limit is imposed, a sample of
submitted daily expenses is taken to see whether the limit is being
observed.
 The null hypothesis is 𝐻0 : 𝜇 = $100.00 but the manager is concerned
only with excessively high expenses.
 Thus, the appropriate alternative hypothesis here is 𝐻1 : 𝜇 > $100.00.
 The null hypothesis is rejected only if the sample mean is significantly
higher than $100.00. This is an example of a right-tailed test.
Right-Tailed Test
Left-Tailed Test
Example:
 The wholesaler buys bulbs in large lots and does not want to accept a lot of
bulbs unless their mean life is at least 1,000 hours. As each shipment arrives,
the wholesaler decides to test a sample to decide whether it should accept the
shipment. The company will reject the shipment only if it feels the mean life
is below 1000 hours. If it feels the bulbs have a longer life above 1,000 hours,
it will not reject the shipment because the longer life is for free.
 Therefore the wholesaler’s hypotheses are:
𝐻0 : 𝜇 = 1,000 ℎ𝑜𝑢𝑟, 𝐻1 : 𝜇 < 1,000 ℎ𝑜𝑢𝑟𝑠
 Therefore the wholesaler rejects the shipment only if the mean life of the
bulbs is significantly below 1,000 hours. This is a left-tailed test
One- and Two- Tailed Tests
The rules for choosing the appropriate distribution are similar to those we used
when studying estimation.
HYPOTHESIS TESTING When the Population When the Population
FOR
Standard Deviation is Standard Deviation is
MEANS Known Not Known

Sample size is larger Normal distribution, 𝑧 Normal distribution,


than 30 table 𝑧 table

Sample size 𝑛 is 30 or Normal distribution, 𝑡 distribution, 𝑡 table


less and we assume 𝑧 table
the population is
normal or
approximately so
One- and Two- Tailed Tests
 In addition, use the finite population multiplier whenever all
three of the following hold:
- the population is finite in size,
- sampling is done without replacement
- the sample is more than 5 percent of the population.

Potrebbero piacerti anche