T Test and Z Test
T Test and Z Test
H 0: p = 0.4 0
H1: p 0.40
© 2007 Prentice Hall 15-4
A General Procedure for Hypothesis Testing
Step 2: Select an Appropriate Test
The test statistic measures how close the sample
has come to the null hypothesis.
The test statistic often follows a well-known
distribution, such as the normal, t, or chi-square
distribution.
In our example, the z statistic, which follows the
standard normal distribution, would be appropriate.
p-p
z=
sp
where
p (1 - p)
sp =
© 2007 Prentice Hall n 15-5
A General Procedure for Hypothesis Testing
Step 3: Choose a Level of Significance
Type I Error
Type I error occurs when the sample results lead to
the rejection of the null hypothesis when it is in fact
true.
The probability of type I error ( ) is also called the
level of significance.
Type II Error
Type II error occurs when, based on the sample
results, the null hypothesis is not rejected when it is in
fact false.
The probability of type II error is denoted by b .
Unlike , which is specified by the researcher, the
magnitude of b depends on the actual value of the
population parameter (proportion).
© 2007 Prentice Hall 15-6
A General Procedure for Hypothesis Testing
Step 3: Choose a Level of Significance
Power of a Test
The power of a test is the probability (1 - b )
of rejecting the null hypothesis when it is false
and should be rejected.
Although b is unknown, it is related to . An
extremely low value of (e.g., = 0.001) will
result in intolerably high b errors.
So it is necessary to balance the two types of
errors.
95% of
Total Area
= 0.05
Z
= 0.40
Z = 1.645
Critical Value
of Z 99% of
Total Area
b = 0.01
Z
= 0.45
© 2007 Prentice Hall Z b = -2.33 15-8
Probability of z with a One-Tailed Test
Fig. 15.5
Shaded Area
= 0.9699
Unshaded Area
= 0.0301
0 z = 1.88
© 2007 Prentice Hall 15-9
A General Procedure for Hypothesis Testing
Step 4: Collect Data and Calculate Test
Statistic
The required data are collected and the value
of the test statistic computed.
In our example, the value of the sample
proportion is
p = 17/30 = 0.567.
The value of sp can be determined as follows:
sp = p(1 - p)
n
=
(0.40)(0.6)
30
© 2007 Prentice Hall = 0.089 15-10
A General Procedure for Hypothesis Testing
Step 4: Collect Data and Calculate Test
Statistic
pˆ - p
z =
s p
= 0.567-0.40
0.089
= 1.88
© 2007 Prentice Hall 15-11
A General Procedure for Hypothesis Testing
Step 5: Determine the Probability
(Critical Value)
Using standard normal tables (Table 2 of the Statistical
Appendix), the probability of obtaining a z value of
1.88 can be calculated (see Figure 15.5).
The shaded area between - and 1.88 is 0.9699.
Therefore, the area to the right of z = 1.88 is 1.0000 -
0.9699 = 0.0301.
Alternatively, the critical value of z, which will give an
area to the right side of the critical value of 0.05, is
between 1.64 and 1.65 and equals 1.645.
Note, in determining the critical value of the test
statistic, the area to the right of the critical value is
either or /2 . It is for a one-tail test and
/2 for a two-tail test.
© 2007 Prentice Hall 15-12
A General Procedure for Hypothesis Testing
Steps 6 & 7: Compare the Probability
(Critical Value) and Making the Decision
If the probability associated with the calculated or
observed value of the test statistic (TS CAL ) is less than
the level of significance ( ), the null hypothesis is
rejected.
The probability associated with the calculated or
observed value of the test statistic is 0.0301. This is the
probability of getting a p value of 0.567 when = 0.40.
This is less than the level of significance of 0.05. Hence,
the null hypothesis is rejected.
Alternatively, if the calculated value of the test statistic is
greater than the critical value of the test statistic (TS CR ),
the null hypothesis is rejected.
© 2007 Prentice Hall 15-13
A General Procedure for Hypothesis Testing
Steps 6 & 7: Compare the Probability
(Critical Value) and Making the Decision
= 1.579/5.385 = 0.293
H :m =m
0 1 2
H :m m
1 1 2
n1 n2 2 2
(X - X ) + (X - X ) 2 (n 1 - 1) s1 + (n 2-1) s2
2 2
=
2 i =1
i1
or s =
1
i =1
i2 2
s
n + n -2 1
n1 + n2 -2
2
© 2007 Prentice Hall 15-24
Two Independent Samples Means
sX 1 - X 2 = s 2 (n1 + n1 )
1 2
H0: s
1
2 = s2
2
H1: s
1
2 s2
2
Number Standard
of Cases Mean Deviation
15.507 0.000
t Test
Equal Variances Assumed Equal Variances Not Assumed
where
n1P1 + n2P2
P = n1 + n2
© 2007 Prentice Hall 15-30
Two Independent Samples Proportions
P -P 1 2 = (11/15) -(6/15)
Z = 0.333/0.181 = 1.84
© 2007 Prentice Hall 15-31
Two Independent Samples
Proportions
D - mD
tn-1 = sD
n
continued…
© 2007 Prentice Hall 15-33
Paired Samples
Where:
n
S Di
D = i=1n
n
S=1 (Di - D)2
sD = i
n-1
S
SD = n
D
Difference = Internet
- - Technology
Analyze>Descriptive Statistics>Frequencies
Analyze>Descriptive Statistics>Descriptives
Analyze>Descriptive Statistics>Explore
Analyze>Descriptive Statistics>Crosstabs
© 2007 Prentice Hall 15-38
SPSS Windows
The major program for conducting parametric
tests in SPSS is COMPARE MEANS. This program can
be used to conduct t tests on one sample or
independent or paired samples. To select these
procedures using SPSS for Windows click:
Analyze>Compare Means>Means …
Analyze>Compare Means>One-Sample T Test …
Analyze>Compare Means>Independent- Samples T Test …
Analyze>Compare Means>Paired-Samples T Test …
© 2007 Prentice Hall 15-39
SPSS Windows
The nonparametric tests discussed in this chapter can
be conducted using NONPARAMETRIC TESTS.
Analyze>Nonparametric Tests>Chi-Square …
Analyze>Nonparametric Tests>Binomial …
Analyze>Nonparametric Tests>Runs …
Analyze>Nonparametric Tests>1-Sample K-S …
Analyze>Nonparametric Tests>2 Independent Samples …
Analyze>Nonparametric Tests>2 Related Samples …
© 2007 Prentice Hall 15-40
SPSS Windows: Frequencies
1. Select ANALYZE on the SPSS menu bar.
2. Click DESCRIPTIVE STATISTICS and select
FREQUENCIES
3. Move the variable “Familiarity [familiar]” to the
VARIABLE(s) box.
4. Click STATISTICS
5. Select MEAN, MEDIAN, MODE, STD. DEVIATION,
VARIANCE, and RANGE.
© 2007 Prentice Hall 15-41
SPSS Windows:
Frequencies
6. Click CONTINUE
7. Click CHARTS
8. Click HISTOGRAMS, then click CONTINUE
9. Click OK
8. Click STATISTICS
4. Click OK.