You are on page 1of 31

Research Methodology and

Applied Statistics
Week 5
HYPOTHESIS TEST FOR MEAN :
ONE SAMPLE
REFERENCES

Anthony Hayter. (2012). Probability and statistics


for engineers and scientists. 04. Thomson
Brooks/Cole. Australia. ISBN: 9789814336208.

Bina Nusantara University 2


Learning Outcomes
LO3: Use proper statistical techniques for statistical
decision making
LO4: interpret the result of the calculation

Bina Nusantara University 3


Hypothesis Testing Methodology

 A hypothesis is a claim (assumption) about a


population parameter through sampling
 It typically begins with some theory, claim, or assertion
about a particular parameter of a population

Example :
 The population mean age is μ = 50
 The mean monthly cell phone bill of this city is μ =
$52
 The proportion of adults in this city with cell phones is
π = .68
Bina Nusantara
Hypothesis Testing Methodology

Null Hypothesis (H0):


• It is an initial allegation about the statements that may
be accepted or rejected.
• It refers to the status quo or the current belief in a
situation
• Always contains “=” , “≤” or “” sign
• May or may not be rejected

Bina Nusantara
Hypothesis Testing Methodology

Alternative Hypothesis (H1) :


• Is the opposite of the null hypothesis
• Represents a research claim or specific inference you
would like to prove
• Never contains the “=” , “≤” or “” sign
• May or may not be proven

Bina Nusantara
Hypothesis Testing Methodology

Example 1:
• Claim: The population mean age is 50.
– H0: μ = 50, H1: μ ≠ 50
• Sample the population and find sample mean.

Population

Sample

Bina Nusantara
Hypothesis Testing Methodology

Types of H0 and H1
One population mean: One population proportion:
one way : one way :
H0: m ³ mo H 0 : p ³ po
H1: m < mo H1: p < po
H0: m £ mo H0 : p £ p o
H1: m > mo H1: p > po

 two way : two way :


H0: m = mo H 0 : p = po
Bina Nusantara
H1: m ¹ mo H1: p ¹ po
Hypothesis Testing
Methodology
Error in Decision Making
Possible Hypothesis Test Outcomes
Actual Situation
Decision H0 True H0 False
Do Not No Error Type II Error
Reject H0 Probability 1 - α Probability β
Reject H0 Type I Error No Error
Probability α Probability 1 - β

Bina Nusantara
Hypothesis Testing Methodology

The Test Statistic and Critical Values


a/
Upper-tail test
a/ 2
a
2
0
0
Represents critical value

Rejection region is
shaded
Lower-tail a
test

0
Bina Nusantara
Hypothesis Testing Methodology

Steps of Hypothesis Testing:


1. State the null hypothesis, H0 and state the
alternative hypotheses, H1
2. Choose the level of significance, α, and the sample
size n.
3. Determine the appropriate test statistic and sampling
distribution
4. Determine the critical values that divided the value
of the test statistic

Bina Nusantara
Hypothesis Testing Methodology

Steps of Hypothesis Testing: (cont.)


5. Collect data and compute the test statistic from the
sample result
6. Compare the test statistic to the critical value to
determine whether the test statistic falls in the
region of rejection. Make the statistical decision:
Reject H0 if the test statistic falls in the rejection
region. Express the decision in the context of the
problem

Bina Nusantara
Z Test of Hypothesis for the mean
(σ Known)
The Test Statistic and Critical Values
Hypothesis σ known
Test Critical Values
Statistic

H0: m ³ mo ¯𝑥 − 𝜇 𝑜
   𝑧 ≤ − 𝑧 𝛼
𝑧=
H 1 : m < mo 𝜎 / √𝑛

H 0: m £ mo ¯𝑥 − 𝜇 𝑜
 
𝑧=
𝜎 / √𝑛
𝑧≥ 𝑧 𝛼
 
H1: m > mo

H 0 : m = mo   ¯𝑥 − 𝜇 𝑜 z  z / 2 or
𝑧= z   z / 2
𝜎 / √𝑛
Bina Nusantara H1: m ¹ mo
Z Test of Hypothesis for the mean
(σ Known)

Example 2:
The manager of a fast food restaurant want to determine
whether the waiting time to place an order has changed
in the past month from its previous population mean
value 4.5 minutes and standard deviation 1.2. To examine
it, he select 25 sample and the sample mean is 5.1.
Determine that the mean waiting time is 4.5. (level of
significance α=5%)

Bina Nusantara
Z Test of Hypothesis for the mean
(σ Known)

Example 2: (Cont.)
Step 1 : Hypotheses :
H0: μ = 4.5 H1: μ ≠ 4.5 (This is a two tailed
test)
Step 2 : level of significance  = .05 and sample size n = 25
Step 3 : Determine the appropriate technique
σ is known so this is a Z test
Step 4 : Critical values :
For  = .05 the critical Z values are ±1.96
Ho rejected if Z<-1.96 or Z>1.96

Bina Nusantara
Z Test of Hypothesis for the mean
(σ Known)

Example 2: (Cont.)
Step 5 : Statistical Test
5.1  4.5
z  2.5
1.2 / 25

Step 6 : Because z=2.5 > 1.96, so reject H0 and conclude that


there is evidence that the population mean waiting time
to place an order has changed from its previous value of
4.5 minutes

Bina Nusantara
Z Test of Hypothesis for the mean
(σ Known)

Example 2: (Cont.)
Is the test statistic in the rejection region?

Reject H0  = 0.05/2  = 0.05/2


if
Z < -1.96
Reject H0 Do not reject H0 Reject H0
or Z >
1.96; -Z= -1.96 0 +Z= +1.96
otherwise
do not
reject H0 Here, Z = 2.5 > 1.96, so the test
Bina Nusantara
statistic is in the rejection region
t Test of Hypothesis for the mean
(σ Unknown)
Hypothesis σ un known
Test Critical Values
Statistic
The Test
H0: m ³ mo ¯𝑥 − 𝜇𝑜 Statistic and
 
 𝑡𝑧=≤ − 𝑧𝛼 𝑡  ≤ −𝑡 𝛼; 𝑛 −1 Critical
H1: m < mo 𝑠/√𝑛
Values
H0: m £ mo   ¯𝑥 − 𝜇𝑜
𝑡=
 𝑧≥ 𝑠𝑧/ √ 𝑛 𝑡  ≥ 𝑡 𝛼 ;𝑛 − 1
H1: m > mo 𝛼

H0: m = mo t  t / 2 or
𝑥/ 2 −
z   z¯ or𝜇𝑜
𝑡= t  t / 2
z   z𝑠 //2 √ 𝑛
H1: m ¹ mo
Bina Nusantara University 18
t Test of Hypothesis for the
mean (σ Unknown)

Example 3:
The Saxon Home Improvement Company said that over the
past five years, the mean amount per sales invoice is $120.
To inform the amount change, this company get the 12
sample of sales invoice, there are :
108.98 152.22 111.45 110.59 127.46 107.26
93.32 91.97 111.56 75.71 128.58 135.11

Test hypothesis if the meant amount more than $120.

Bina Nusantara
t Test of Hypothesis for the mean
(σ Unknown)

Example 3: (Cont.)
Step 1 : Hypotheses :
H0: μ ≤120 H1: μ > 120 (This is a one tailed test)
Step 2 : level of significance  = 0.05 and sample size n = 12
Step 3 : Determine the appropriate technique
σ is unknown so this is a t-test
Step 4 : Critical values :
t0.05;12 1  1.7959
Ho rejected if t  t ;n 1

Bina Nusantara
t Test of Hypothesis for the mean
(σ Unknown)

Example 3: (Cont.)
Step 5 : Statistical Test
  𝑛 2
( 𝑥 𝑖 − ¯𝑥 )
n
xi
x    112 .85
i 1 n
2
𝑠= √ 𝑠 =
√ ∑
𝑖=1 𝑛−1
=20.80

  𝟏𝟏𝟐.𝟖𝟓 −𝟏𝟐𝟎
𝒕= =−𝟏 . 𝟏𝟗𝟎𝟖
𝟐𝟎 . 𝟖𝟎/ √ 𝟏𝟐
Step 6 : Because t=-1.1908 < t , so don’t reject
0.05;121  1.7959
H0

Bina Nusantara
t Test of Hypothesis for the mean
(σ Unknown)

Example 3: (Cont.)
Is the test statistic in the rejection region?

 = 0.05

Do not reject H0 Reject H0

0 t0.05;121  1.7959

Here, t=-1.1908 < 1.7959, so the test


statistic is in the acceptance region
Bina Nusantara
Z Test of Hypothesis for the
Proportion

• Involves categorical variables


• Two possible outcomes
– “Success” (possesses a certain characteristic)
– “Failure” (does not possesses that characteristic)
• Fraction or proportion of the population in the
“success” category is denoted by p

Bina Nusantara
Z Test of Hypothesis for the
Proportion

Statistical Test :
p  po
Z
po (1  po )
n

Z is the standardized normal value for the level of confidence


desired
ppo : the sample proportion
: hypothesized proportion of successes in the population
n : the sample size

Bina Nusantara
Z Test of Hypothesis for the
Proportion
The Test Statistic and Critical Values
Hypothesis Test Statistic Critical
Values

H 0: p ³ p o z   z
H 1: p < p o
  = 𝑝 − 𝑝𝑜
¯
𝑍
H0 : p £ p o
√ 𝑝𝑜 (1 − 𝑝 𝑜)
𝑛
z  z
H1 : p > p o

z  z / 2 or
H0 : p = p o
z   z / 2
H1 : p ¹ p o

Bina Nusantara
Z Test of Hypothesis for the
Proportion

Example 4:
A marketing company claims that it receives 8% responses
from its mailing. To test this claim, a random sample of 500
were surveyed with 30 responses. Test at the  = .05
significance level.

Bina Nusantara
Z Test of Hypothesis for the
Proportion

Example 4:
Step 1 : Hypotheses :
H0: p = 0.08
H1: p ≠ 0.08 (This is a two tailed test)
Step 2 : level of significance  = 0.05 and sample size n = 30
Step 3 : Determine the appropriate technique = Z test
Step 4 : Critical values :
For  = 0.05 the critical Z values are ±1.96
Ho rejected if Z<-1.96 or Z>1.96

Bina Nusantara
Z Test of Hypothesis for the
Proportion

Example 4: (Cont.)
Step 5 : Statistical Test

¯𝑝=30/500=0.06
  .025 .025

0 z
-1.96 1.96
-1.648

Step 6 : Because z=-1.648 > -1.96, so don’t reject Ho and There isn’t
sufficient evidence to reject the company’s claim of 8%
response rate.

Bina Nusantara
EXERCISES

1. A company claims that its components have an average


length of 82.5 mm. An experimenter tested this claim by
measuring the lengths of a random sample of 25
components. It was found that mean sample is 82.40
and standard deviation sample is 0.14. Use a hypothesis
test to assess weather the experimenter has sufficient
evidence to conclude that the average lengths of the
components is different from 82.5

Bina Nusantara
EXERCISES

2. A builder claims that heat pumps are installed in 70%


of all homes being constructed today in the city of
Richmond, Virginia. Would you agree with this claim if
a random survey of new homes in this city shows that
8 out of 15 had heat pumps installed?. Use 0.10 level
of significance.

Bina Nusantara
Thank You

You might also like