You are on page 1of 16

# 1

HYPOTHESIS TESTING
Definition
A hypothesis testing is a method requiring to state a claim unambigously to determine whether a statistic
(a characteristic of sample) is consistent with a known parameter (a characteristic of population). Example a
claim that the population mean is 368 grams. Than we do a sampling and examine the sample statistic to see if it
better supports the stated claim. The claim is called null hypothesis or the mutually exclusive alternative or the
test hypothesis. The null hypothesis is stated as :
H 0 :   368
Whenever a null hypothesis is specified, an alternative hypothesis is also specified and it must be true if
the null hypothesis is false. The alternative hypothesis or research hypothesis is always the opposite of the null
hypothesis. The hypothesis alternatives are stated below :
A. H 1 :   368 or B. H 1 :   368 or C. H 1 :   368

Critical Critical
Region Region
(H1) 1- α =γ (H1) Significa
nt level
Region of non
rejection (H0)
α

Critical Critical
Value Value

If you have sufficient evidence from the sample information that null hypothesis is false, so you must reject the
null hypothesis and you have statistical proof that alternative hypothesis is correct.

## Critical Value of the Test Statistic

Critical value is any values that are used to reject null hypothesis. If we have seen that the population
have a given probability distribution than we take a test statistic based on that probability distribution. (normal
or t distribution). Test statisic is a statistic used to help make the decision in a hypothesis test.

## Regions of Rejection or Critical Region and Regions of Nonrejection

The set of all points in the sample space that result in the decision to reject the null hypothesis is called
rejection region or critical region.
When a test is intended to the rejection region corresponds to the largest values of the test statistic is
called upper-tailed test. (figure C)
When a test is intended to the rejection region corresponds to the smallest values of the test statistic is
called lower-tailed test. These are both one-tailed tests. (figure B)
If the test statistic is selected so that the largest values of the test statistic and the smallest values of the
test statistic, combined, correspond to the rejection region, the test is called a two-tailed test (figure A).

## Risks in Decion making

1. A type I error occurs if we reject the null hypothesis, H0, when it is true and sould not be rejected. The
probability of a type I error is α
2. A type II error occurs if we do not reject the null hypothesis, H0, when it is false and sould be rejected.
The probability of a type II error is β

The Level of Significance or Significant Level (α) is the probability that we will t reject the null hypothesis,
H0, when it is true and should not be rejected.

The Level of Confidence or Confident Level (1-α) is the probability that we will not reject the null hypothesis,
H0, when it is true and should not be rejected.

## The Six Steps Method of Hypothesis Testing

1. State the null hypothesis, H0, and alternative hypothesis H1
2. Choose the level of significance (α)
3. Determine the appropriate test statistic and sampling distribution
4. Determine the critical values
2
5. Collect the sample data and compute the value of the test statistic
6. Make statistical decision and state the managerial conclusion.

## Z Test Of Hypothesis For The Mean (σ Is Known)

Problem : you are the manager of a fast food restaurant. You determine whether the population mean waiting
time to place an order has changed in the past month from its previous population mean value of 4,5 minutes.
From past experience, you can assume that the population is normally distributed with a population standard
deviation of 1,2 minutes. You select a sample of 35 orders during a one-hour period. The sample mean is 5,1
minutes. Test whether there is evidence at the 0,05 level of significance that the population mean waiting
time to place an order has changed in the past month.
Solution :
I. Z numbers approach
Step 1. Ho : the population mean has not changed from its previous value of 4,5 minutes
H1 : the population mean has changed from its previous value of 4,5 minutes
H 0 :   4,5 Critical Critical
Region
H 1 :   4,5 0,025
Region
(H1) 0,025
(H1) 1- 0,5 =0,95
Region of non
rejection (H0)
1/2α

## Step 2. n = 35; α = 0,05 -Z1/2α Z1/2α

Step 3. Because it is known that σ = 1,2 and μ = 4,5 and the distribution is normal than we use Z test
Step 4. Because α = 0,05, the critical values of z test statistic are -Z1/2α <Z< + Z1/2α = -Z0,025<Z<+ Z0,025 = -1,96 < Z < 1,96
Step 5. Collect the sample data; X  5,1 . Calculate the test statistic :
X  X 5,1  4,5
Z hit  Z hit 
 = 1,2 = 2,96
n 35
Step 6. Because Ztest > Z1/2α = 2,96 > 1,96 the null hypothesis is rejected. There is evidence that population mean
waiting time to place an order has changed from its previous value of 4,5. The mean waiting time for
customers is longer now than it was last month.

## II. p-Value approach

p-Value (often referred to as observed level of significance) is the probability of getting a test statistic
equal to or more extreme than the sample result, given that the null hypothesis, H0, is true. Or p-Value is the
samllest level at which Ho can be rejected.
The decision rules for rejecting Ho on the p-Value are
1. If the p-Value is greater than or equal to α, do not reject the null hypothesis
2. If the p-Value is less than α, reject the null hypothesis
Step 5. Because Ztest = 2,5 than P (Ztest =2,5) = 0,9938. p-Value = 1-p(Ztest = 2,5)
p-Value =1- 0,9938
= 0,0062
Because the test is two-tailed test so p-Value = 2 x 0,0062 = 0,0124
Step 6. Because p-Value = 0,0124 < α = 0,05, we reject the null hypothesis. There is evidence that population
mean waiting time to place an order has changed from its previous value of 4,5. The mean waiting time
for customers is longer now than it was last month.

## III. Parameters estimation approach

Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not ˆ1    ˆ 2
 1,2
1  X   p  X  Z test  X  Z  / 2  5,1  1,96  4,702
n 35
 1,2
1  X   p  X  Z test  X  Z  / 2  5,1  1,96  5,5
n 35
Step 6. Because 4,702 ≤ 4,5≤ 5,5 not in the rage so there is no sufficient evidence to accept Ho
3
T Test Of Hypothesis For The Mean (σ Is Unknown)
Problem : you are the manager of a fast food restaurant. You determine whether the population mean waiting
time to place an order has changed in the past month from its previous population mean value of 4,5 minutes.
From past experience, you can assume that the population is normally distributed. You select a sample of 25
orders during a one-hour period. The sample mean is 5,1 minutes and the standard deviation is 0,7 minutes.
Test whether there is evidence at the 0,05 level of significance that the population mean waiting time to place
an order has changed in the past month.
Solution :
I. t numbers approach
Step 1. Ho : the population mean has not changed from its previous value of 4,5 minutes
H1 : the population mean has changed from its previous value of 4,5 minutes
H 0 :   4,5 Critical Critical
Region
H 1 :   4,5 0,025
Region
(H1) 0,025
(H1) 1- 0,5 =0,95
Region of non
rejection (H0)
1/2α

## Step 2. n = 25; α = 0,05 -t1/2α t1/2α

Step 3. Because it is known that σ = unknown and μ = 4,5 and the distribution is normal than we use t test
Step 4. Because α = 0,05, the critical values of z test statistic are - t n-1;0,025≤t≤+ t 25-1;0,025 = -2,3910 ≤Z ≤ 2,3910
Step 5. Collect the sample data; X  5,1 . Calculate the test statistic :
X  X 5,1  4,5
ttest  t test 
s = 0,7 = t test  4,286
n 25
Step 6. Because ttest > t1/2α = 4,286 > 2,0639 the null hypothesis is rejected. There is sufficient evidence that
population mean waiting time to place an order has changed from its previous value of 4,5.

## II. p-Value approach

Step 5. Because ttest = 4,286 than P (ttest=4,286) = p-Value = 0,000535
0,001
0,000535
0 0,0001
3,745399 4,285714286 4,654381

Step 6. Because p-Value = 0,0005350 < α = 0,05, we reject the null hypothesis. There is sufficient evidence that population
mean waiting time to place an order has changed from its previous value of 4,5.

## III. Parameters estimation approach

Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not ˆ1    ˆ 2
 0,7
1  X   p  X  t test  X  t / 2  5,1  3,3910  4,765
n 25
 0,7
1  X   p  X  t test  X  t / 2  5,1  2,3910  5,435
n 25
Step 6. Because 4,702 ≤ 4,5≤ 5,5 not in the rage so there is no sufficient evidence to accept Ho

## Z test of hypothesis for the proportion

Problem : the reputations (and hence sales) of many business can be severely damaged by shipments of
manufactured items that contain a large percentage of defectives. A manufacturer of Alkaline batteries
may want to be reasonably certain that fewer than 5% if its batteries are defective. Suppose 300 batteries
are randomly selected from a very large shipment; each is tested and 10 defective batteries are found.
Does this provide sufficient evidence for the manufacturer to conclude that the fraction defective in the
entire shipment is less than 0,5 ? use α = 0,01
Solution :
I. Z numbers approach
4
Step 1. Ho : the fraction of defective batteries equals 0,05
H1 : the fraction of defective batteries is less than 0,05
H 0 :   0,05
H 1 :   0,05

## Step 2. n = 300 ; α = 0,01

Step 3. Because it is known that   0,05   p and the distribution is normal than we use Z test
Step 4. Because α = 0,01, the critical values of z test statistic are Z< - Zα = Z<- Z0,01 = Z < -2,33
x 10
Step 5. Collect the sample data; p    0,033 . Calculate the test statistic :
n 300
0,033  0,05  0,017  0,017
p  p Z test     1,35
Z test  = pq 0,05 x0,95 0,0126
p
n 300
Step 6. Because Ztest > Zα = -1,35 > -2,33 the null hypothesis is not rejected. There is evidence that the fraction of
defective batteries equals 0,05

## II. p-Value approach

Step 5. Because Ztest = -1,35 than P (Ztest = -1,35) = 0,4115. p-Value = 0,5 - p(Ztest = -1,35)
p-Value = 0,5 - 0,4115
= 0,0885(one-tailed test)
Step 6. Because p-Value = 0,0885 < α = 0,01, we do not reject the null hypothesis. There is evidence that the
fraction of defective batteries equals 0,05

## III. Parameters estimation approach

Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not

## Z Test Of Hypothesis For The Difference Between Two Independent Means

Problem : In recent years, the united states and Japan have engaged in intense negotiations regarding restrictions
on trade between the two country. An economist decided to test the hypothesis that higher retail prices are
being charged for Japanese automobiles in Japan than in the United States. She obtained independent random
samples of 50 retail sales in the United States with x  \$16596; s  \$1981 and 50 retail sales in Japan over
the same time period with x  \$17236; s  \$1974 and for the same model of automobile, converted the
Japanese sales prices from yen to dollars using current conversion rates. Form a 95 % confidence interval for
the difference between the population mean retail prices of this automobile model for two countries
Solution :
I. Z numbers approach
Step 1. Ho : The retail prices are being charged the same for Japanese automobiles in Japan and in the United States
H1 : The retail prices are being charged higher for Japanese automobiles in Japan than in the United States
H 0 : 1   2  0; ( 1   2 )
H 0 : 1   2  0; ( 1   2 )

## Step 2. n1 = 50; n2 = 50; α = 0,05

Step 3. Because it is known that σ = unknown and and the distribution is normal than we use Z test
Step 4. Because α = 0,05, the critical values of z test statistic are Z< -Zα = Z< -Z0,05 = Z< --1,645
Step 5. Collect the sample data; x1  \$16596; s1  \$1981 ; x 2  \$17236; s 2  \$1974 Calculate the test statistic :
5
( X1  X 2 )  0 (16596  17236)  0
(X1  X 2 )  0 Z hit    1,62
Z hit  = s1 s
2 2
1982 2 1974 2
 ( X1  X 2 )  2 
n1 n2 50 50
Step 6. Because Ztest > -Z0,05 = -,162 > -1,645 the null hypothesis is not rejected. There is not sufficient evidence
that the retail prices are being charged higher for Japanese automobiles in Japan than in the United States

## II. p-Value approach

Step 5. Because Ztest = -1,62 than P (Ztest = -1,62) = 0,9474 p-Value = 0,5- P (Ztest = -1,62)
p-Value = 0,5- 0,4474
= 0,0526
Step 6. Because p-Value = 0,0526 > α = 0,05, we do not reject the null hypothesis. The retail prices are being charged higher
for Japanese automobiles in Japan than in the United States.

## III. Parameters estimation approach

Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not

## Z Test Of Hypothesis For The Difference Between Two Independent Proportions

Problem : a consumer advocacy group wants to determine whether there is a difference between the proportions of the two
leading automobile models that need major repairs (more than \$500) within 2 years of their purchase. A sample of 400
two-year owners of model 1 is contacted, and a sample of 500 two-years owner of model 2 is contacted. The numbers
x1 and x2 of owners who report that their cards needed major repairs within the first 2 years are 53 and 78,
respectively. Test the null hypothesis that no difference exists between the proportions in populations 1 and 2 needing
major repairs againts the alternative that a difference does exist. Use α = 0,1.
Solution :
I. Z numbers approach
Step 1. Ho : The retail prices are being charged the same for Japanese automobiles in Japan and in the United States
H1 : The retail prices are being charged higher for Japanese automobiles in Japan than in the United States
H 0 :  1   2  0; ( 1   2 )
H 0 :  1   2  0; ( 1   2 )

## Step 2. n1 = 400; n2 = 500; α = 0,1

Step 3. Because the distribution is normal than we use Z test
Step 4. Because α = 0,1, the critical values of z test statistic are -Z1/2α <Z< + Z1/2α = -Z0,05<Z<+ Z0,05 = -1,64 < Z < 1,64
53 78
Step 5. Collect the sample data; p1   0,1325; p 2   0,156 ; Calculate the test statistic :
400 500
x  x2 53  78
p 1   0,1456 q  1  0,1456  0,8544
n1  n 2 400  500
( p1  q 2 )  0 (0,1325  0,156)  0  0,0235
( p  p 2 )  ( 1   2 ) Z hit     0,99
Z cal  1 = pq pq (0,1456x0,8544) (0,1456x0,8544) 0,0237
 ( pˆ1  pˆ 2 )  
n1 n2 400 500

Step 6. Because Ztest > -Z0,05 = -0,99 > -1,64 the null hypothesis is not rejected. There is not a difference between the
proportions of the two leading automobile models that need major repairs (more than \$500) within 2 years of their
purchase
II. p-Value approach
Step 5. Because Ztest = -0,99 than P (Ztest = -0,99) = 0,3389 p-Value = 0,5- P (Ztest = -0,99)
6
p-Value = 0,5-0,3389
= 0,1611
Step 6. Because p-Value = 0,1611 > α = 0,1, we do not reject the null hypothesis. there is a difference between the
proportions of the two leading automobile models that need major repairs (more than \$500) within 2 years of their
purchase
III. Parameters estimation approach
Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not

## EXERCISES (PROBLEM SOLVING)

Z Test Of Hypothesis For The Mean (σ Is Known)
Problem : the operations manager at a clothing factory needs to determine whether a new machine is producing a
particular type of cloth according to the manufacturer’s spesifications, which indicate that the cloth should have a
mean breaking strength of 70 pounds and a standard deviation of 3,5 pounds. A sample of 49 piecies of the cloth
reveals a sample mean breaking strength of 69,1 pounds.
Solution :
I. Z numbers approach
Step 1. Ho : __________________________________________________________________________

H1 : __________________________________________________________________________

H0 :  
H1 : 

## Step 2. n =........ ; α = .............

Step 3. Because it is known that σ = ......... and μ = .........and the distribution is normal than we use Z test
Step 4. The critical values of z test statistic are ...................................................................................................
Step 5. Collect the sample data; X  ....... . Calculate the test statistic :
X  X ............  ..............
Z cal  Z hit 
 = .......... = Z hit  .......................
n ..........
Step 6. Because ........................ the null hypothesis ...............rejected. There ............................................
..............................................................................................................................................................
II. p-Value approach

Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ........... α = ........., we .................the null hypothesis.There .....................................
...............................................................................................................................................................

## III. Parameters estimation approach

Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not
7

## T Test Of Hypothesis For The Mean (σ Is Unknown)

Problem : late payment of medical claims can add to the cost of health care. An article reported that the mean time
from the date of service to the date of payment for one insurance company was 4,14 days during a recent
period. Suppose that a sample of 10 medical claims is selected during the latest time period. The sample mean
time from the service date to date of payment was 3,96 days, and the sample standard deviation was 0,74 days.
Using the 0,05 level of significance, is there evidence that the mean time from the date of service to the date of
payment for one insurance company was 4,14 days
Solution :
I. t numbers approach
Step 1. Ho : __________________________________________________________________________

H1 : __________________________________________________________________________

H0 :  
H1 : 

## Step 2. n =........ ; α = .............

Step 3. Because it is known that σ = ......... and μ = .........and the distribution is normal than we use t test
Step 4. The critical values of z test statistic are ...................................................................................................
Step 5. Collect the sample data; X  ....... . Calculate the test statistic :
X  X ............  ..............
t cal  Z hit 
s = .......... = Z hit  .......................
n ..........
Step 6. Because ........................ the null hypothesis ...............rejected. There ............................................
..............................................................................................................................................................
II. p-Value approach

Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ........... α = ........., we .................the null hypothesis.There .....................................
..............................................................................................................................................................
III. Parameters estimation approach
Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not

## Z Test Of Hypothesis For The Proportion (σ Is Known)

Problem : many public polling agencies conduct surveys to determine the current consumer sentiment concerning the
state of the economy. For example, the Bureau of Economic and Business Research (BEBR) at the University of
Florida conducts quarterly surveys to gauge consumer sentiment in the Sunshine State. Suppose nationally
8
current opinions have 50% to be optimistic about the state of economy and that BEBR randomly samples 484
consumers and finds that 257 are optimistic about the state of the economy while Use a 90% confidence interval
to estimate the proportion of all consumers in Florida who are optimistic about the state of the economy. Based
on the confidence interval, can BEBR infer that the majority of Florida consumers are optimistic about the
economy
Solution :
I. Z numbers approach
Step 1. Ho : __________________________________________________________________________

H1 : __________________________________________________________________________

H0 : 
H1 : 

## Step 2. n = .......... ; α = ...........

Step 3. Because it is known that   .......... ...   p and the distribution is normal than we use Z test
Step 4. Because α = 0,01, the critical values of z test statistic are ..............................................................................
x ..........
Step 5. Collect the sample data; p    .............. . Calculate the test statistic :
n ............
............................ ................. ..............
p  p Z hit     .......... ....
Z hit  = pq ............... ..............
p
n ..................
Step 6. Because ........................ the null hypothesis ...............rejected. There ............................................
...............................................................................................................................................................
II. p-Value approach

Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ............α = ........., we .................the null hypothesis.There .....................................
..............................................................................................................................................................

## III. Parameters estimation approach

Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not

## Z Test Of Hypothesis For The Difference Between Two Independent Means

Problem : A local pizza restaurant and a local branch of a national chain are located across the street from a college
campus. The local pizza restaurant advertised that it delivers to dorminatories faster than the national chain. In
order to determine whether this advertisement is valid, you and some friends have decided to order 10 pizzas
from the local pizza restaurant and 10 pizzas from the national chain, all at different times. The mean delivery
time and the standard deviation for the local pizza restaurant are x  16,7 min utes; s  9,5822 min utes . The
mean delivery time and the standard deviation for the national chain are
x  18,88 min utes; s  8,2151min utes . Use a 0,95 % confidence interval to determine is there evidence that
the mean delivery time for local pizza restaurant is less than the mean delivery time for national chain.
Solution :
I. Z numbers approach
9
Step 1. Ho : __________________________________________________________________________

H1 : __________________________________________________________________________
H 0 : 1   2  0; ( 1   2 )
H 0 : 1   2 .....0; ( 1 ..... 2 )

## Step 2. n1 = ......; n2 = ........; α = ..........

Step 3. Because it is known that σ = unknown and and the distribution is normal than we use t test
Step 4. the critical values of z test statistic are ...............................................
Step 5. Collect the sample data; x1  ...........; s1  ................... ; x 2  .......... ..; s 2  ................
Calculate the test statistic :
(X1  X 2 )  0 (.....................)  0 ...........
(X1  X 2 )  0 Z hit     ...........
Z hit  = s1
2
s
2
............. 2
............ 2 ............
 (X X )  2 
1 2
n1 n2 ............. ..............
Step 6. Because .......... =. Ztest ......–Z.....=...... the null hypothesis ........ rejected. There is .... sufficient evidence
that ........................................................................................................................................................
II. p-Value approach
Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ............α = ........., we .................the null
hypothesis.There .............................................................................................................................................
...........................................................
III. Parameters estimation approach
Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not

## Z Test Of Hypothesis For The Difference Between Two Independent Proportions

Problem : suppose you are the manager of TC Resort Properties. On one of the islands TC Resort Properties has
two hotels, the Beachcomber and the Windsurfer. In tabulating the responses to the single questtion, “are you
likely to choose this hotel again ?” 163 of 227 guests at the Beachcomber responded yes, and 154 of 262
guests at the Windsurfer responded yes. At the 0,05 critical level, is there evidence of significant difference in
guests satisfaction between the two hotls ?
Solution
I. Z numbers approach
Step 1. Ho : __________________________________________________________________________

H1 : __________________________________________________________________________
H 0 :  1   2  0; ( 1   2 )
H 0 :  1   2  0; ( 1   2 )

## Step 2. n1 = ......; n2 = ........; α = ..........

10
Step 3. Because the distribution is ............ than we use ..........test
Step 4. the critical values of z test statistic are ...............................................
............ .........
Step 5. Collect the sample data; p1   .,..........; p 2   ......... ; Calculate the test
........... .........
statistic :
x  x2 ............  ...........
p 1   ................ q  1  ............  .................
n1  n2 .........  .........
( p  p 2 )  ( 1   2 )
Z cal  1 =
 ( pˆ1  pˆ 2 )
( p1  p 2 )  0 (..............  ............)  0 ..............
Z hit     .............
pq pq (......................) (...................) ..............
 
n1 n2 ...................... ..................

Step 6. Because .......... =. Ztest ......–Z.....=...... the null hypothesis ........ rejected. There is .... sufficient evidence
that ............................................................................................................................................................
II. p-Value approach
Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ............α = ........., we .................the null hypothesis.There .....................................
...............................................................................................................................................................
III. Parameters estimation approach
Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not

## Step 6. Because not/ in the rage so there is no /sufficient evidence to accept Ho

11
12
PENGUJIAN HIPOTESIS DENGAN SPSS

## Z Test Of Hypothesis For The Mean (σ Is Known)

Problem : you are the manager of a fast food restaurant. You determine whether the population mean waiting
time to place an order has changed in the past month from its previous population mean value of 4,5 minutes.
From past experience, you can assume that the population is normally distributed with a population standard
deviation of 1,2 minutes. You select a sample of 35 orders during a one-hour period. The sample mean is 5,1
minutes. Test whether there is evidence at the 0,05 level of significance that the population mean waiting
time to place an order has changed in the past month.
Solution :
**syntax created by how2stats
**This syntax performs a one sample z-test in SPSS
**Simply enter the four relevant values in the line below underneath the 'begin data' command
**The first number is the sample size (35), the second number is the sample mean (105),
**the third number is the population mean (100)
**and the fourth number is the population standard deviation (15)
**Replace the four values below with your own.
**The p value that is reported is based on a two-tailed test.
**To obtain the one-tailed p value, simply divide the two-tailed p value by 2.
**As an extra, this syntax also calcuates Cohen's d as estimate of effect size.

begin data
35 5.1 4.5 1,2
end data.

## Compute mean_difference = sample_mean - population_mean.

Compute square_root_n =SQRT(n).
Compute standard_difference = population_sd/square_root_n.
Compute z_statistic = mean_difference/standard_difference.
Compute chi_square = z_statistic*z_statistic.
Compute p_value = SIG.CHISQ(chi_square, 1).
Compute cohens_d = mean_difference/population_sd.
EXECUTE.
Formats z_statistic p_value cohens_d (f8.5).
LIST z_statistic p_value cohens_d.
13

Hasil di SPSS

## z_statistic = 2.958 sama dengan manual

Step 5. Collect the sample data; X  5,1 . Calculate the test statistic :
X  X 5,1  4,5
Z hit  Z hit 
 = 1,2 = 2,96
n 35

## p-value sama dengan p-value manual

Step 5. Because Ztest = 2,5 than P (Ztest =2,5) = 0,9938. p-Value = 1-p(Ztest = 2,5)
p-Value =1- 0,9938
= 0,0062
Because the test is two-tailed test so p-Value = 2 x 0,0062 = 0,0124

## T Test Of Hypothesis For The Mean (σ Is Known)

Problem : you are the manager of a fast food restaurant. You determine whether the population mean waiting
time to place an order has changed in the past month from its previous population mean value of 4,5 minutes.
From past experience, you can assume that the population is normally distributed with a population standard
deviation of 1,2 minutes. You select a sample of 25 orders during a one-hour period. The sample mean is 5,1
minutes. Test whether there is evidence at the 0,05 level of significance that the population mean waiting
time to place an order has changed in the past month.
Solution :

1. Buka program SPSS 24, lalu ketik open new data set
14

2. Ketik atau salin dari excel dengan copy ke spss di VAR00001 di bawah ini

No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Waiting Time 4.8 4.9 4.8 4.7 4.6 4.6 4.5 5.2 4.5 4.6 5 5 5 5.3 6.3
No 16 17 18 19 20 21 22 23 24 25 Total Mean Stdev
Waiting Time 6.4 6.5 6.4 6.2 5.3 4.7 5 4.5 4.3 4.3 127.4 5.1 0.7

3. Di program SPSS variable view di klik kemudian diubah name dari VAR0001 menjadi WaitTime dst
seperti di bawah ini
15
4. Klik analyze, compare means, one sample t test

5. Maka setelah proses tersebut dilakukan akan muncul tampilan sebagai berikut kemudian pilih
options dan confidence interval percentage 5% dan exclude cases lalu klik ok:

## 6. Muncul tampilan sebagai berikut:

One-Sample Statistics

One-Sample Test

Test Value = 0

Difference

## Waiting Time 36.385 24 .000 5.09600 4.8069 5.3851

16

Practices
1. Rata-rata nilai pesanan yang diterima sebuah perusahaan mengikuti distribusi normal dengan rata-rata Rp 12,74
juta dan simpangan bakunya Rp 2,45 juta, Ujilah dengan tingkat keyakinan 98% apakah rata-rata nilai pesanan
telah berubah, apabila sampel yang terdiri atas 40 pesanan memiliki rata-rata sebesar Rp 13,45 juta dengan
simpangan baku Rp 2 juta.
2. The quality-control manager at a light bulb factory needs to determine whether the mean life of a large shipment of
light bulbs is equal to 375 hours. The population standard deviation is 100 hours. A random sample of 64 light
bulbs indicates a sample mean life of 350 hours.
a. At the 0.05 level of significance, is there evidence that the mean life is different from 375 hours?
b. Compute the p-value and interpret its meaning.
c. Construct a 95% confidence interval estimate of the populationmean life of the light bulbs.
d. Compare the results of (a) and (c). What conclusions do you reach?
3. A trucking company finds that 40 percent of its shipments arrive late. If from eight scheduled shipments there are 1
late shipment , test is there any evidenc that the company’shipments is being faster than before :
4. You purchase bicycle parts from a supplier in Ciamis that has 3 defects per 100 parts. You are in the market for
150 parts but will not accept a probability of more than 90 percent that more than two parts are defective. Do you
5. Cost overruns for computer upgrades at your firm have averaged \$ 23,500, with a standard deviation of \$ 9,400. as
an executive director of th Research Division, you do not want to risk more than a 34 % chance that the overrun
on a newly proposed upgrade will exceed \$ 25,000. should you implement the upgrade ?
6. Marketing strategists would like to predict consumer response to new products and their accompanying
promotional schemes. Consequently studies that examine the difference between buyers and nonbuyers of a
product are of interest. One classic study conducted by Shuchman and Roesz (journal of marketing research Feb
1975) was aimed at characterizing the purchasers and nonpurchasers of crest toothpaste. The researchers
demonstrated that both the mean household income were significantly larger for purchasers than for
nonpurchasers. A similar study utilized independent random samples of size 20 and yielded tha data on the age of
the househpolder primarily responsible for buying toothpaste in the table below.
a. Do the data present sufficient evidence to conclude there is a difference in the mean age of purchasers
and non purchasers? Use α= 0,01
b. Calculate and interpret a 95% confidence interval for the difference between the mean ages of
purchasers and nonpurchasers
Purchasers NonPurchasers
34 35 23 44 52 46 28 22 44 33 55 63
28 48 28 34 33 52 45 31 60 54 53 58
41 32 34 49 50 45 52 52 66 35 25 48
29 59 59 61