Académique Documents
Professionnel Documents
Culture Documents
Lecture 2
24-9-2018
Mohd Nazri Mahmud
AGENDA
10
The Hypothesis Testing
Framework
11
Estimation of Parameters
1 n
y yi estimates the population mean
n i 1
n
1
S
2
n 1 i 1
( yi y ) estimates the variance
2 2
12
The t-Test
A t test is any statistical hypothesis test for two groups in which the test statistic
has a t distribution if the null hypothesis is true.
A test of the null hypothesis that the means of two normally distributed populations
are equal.
Given two data sets, each characterized by its mean, standard deviation
and number of data points, we can use some kind of t test to determine whether
the means are distinct, provided that the underlying distributions can be assumed
to be normal.
13
The two sample t-Test
The t statistics compares two means to see if they are significantly different from
each other (For the table of t-statistics see Table 2-4 and Table 2-5 page 52)
14
Steps for the two sample t-test
1. State the null hypothesis and the alternative hypothesis
5. Write the decision rule for rejecting the null hypothesis. Refer Table 2-4 / 2-5
Example : Reject H0 if t0 is >= talpha or if t0 <= taplha
State the hypothesis to be tested and using alpha = 0.05, test the hypotheses?
21
Answer
y1 y 2
Test statistic to be used ; t0
1 1
Sp
n1 n2
Degrees of freedom = n1 + n2 -2
y1 mean = 70.4 To find Sp use formula for the estimate of
Y2 mean = 70.2 the common variance ( ie Formula 2-25.p36)
n
S2 1
1S1
2
( n2 1) S 2
2
n1 n2 2
p
Sp = 9
t0=0.050
So, do not reject H0
T0.025,18=2.101
22
Exercise 2
A new filtering device is designed for installation in a chemical system.
Before its installation, a random sample yielded the following information
about the percentage of impurity:
y 2 10.2 S 22 94.73 n2 9
23
Answer
y1 y 2
Test statistic to be used ; t0
1 1
Sp
n1 n2
Degrees of freedom = n1 + n2 -2
Sp = 9.89
t0=0.479
Do not reject H0
T0.025,15=2.131 So, There is no evidence to indicate that the new filtering
device has affected the mean
24
The case of different variances
If we are testing
and cannot reasonably assume that the variances of the two samples are equal,
We must use the test statistic given by equation 2-31 p 48 and degrees of freedom
given by equation 2-32 p 48.
and the variances for both populations are known, use the test statistics given
by equation 2-33 p. 50.
25
Comparing a single mean to a specified value
If the variance of the population is unknown use the test statistic given by
Equation 2-37 p.51.
State the hypotheses that should be tested in this experiment and test these
hypotheses using =0.05. What are your conclusions?
27
Answer
z0=1.35
z0.025 =1.96