You are on page 1of 49

One Sample and Two Sample

T Tests of Means
Business Statistics/ Statistical
Inference

Lecture prepared by Ikram-E-Khuda 1


Tests of Means
• The t tests of means are parametric type of hypothesis tests.

• They are fundamentally based on the assumption that our sample or samples
are taken from sampling distribution of means which is normally distributed.

• Hence the equations/ formulae used here follow those that we studied in CLT.
Esp. t score equations in estimation of single mean and difference of means.

• The t tests are the hypothesis tests which are performed to test about the
population mean(s) using given sample(s) when population standard
deviation is unknown and/ or sample size is less than 30.

• We have two types of tests of means.

• One sample test of mean and 2 samples test of means.

Lecture prepared by Ikram-E-Khuda 2


Tests of Means
• One sample test of mean
– This hypothesis test is used when we are provided some general belief about
population mean and we test it to be true or not using a single sample.

• Two samples test of means


– It has two types. (1) Independent means and (2) dependent means or paired
samples

• Independent means two samples test of means


– This hypothesis test is used when we are provided two separate populations
and it is required to test if there is difference between the two or if one is
greater than the other or if one is lesser than the other. This test is
performed by using two samples’ data from the two different populations.

Lecture prepared by Ikram-E-Khuda 3


Tests of Means
• Dependent means two samples test
– This hypothesis test is used when we are provided
two sub-populations (taken from one single
population) and it is required to test if there is
difference between the two or if one is greater
than the other or if one is lesser than the other.
This test is performed by using two samples’ data
from the two sub-populations and then creating a
new differences sample.

Lecture prepared by Ikram-E-Khuda 4


Null Hypothesis Ho
• It is to be noted that Ho is only defined inside
its specified CI region.

• Outside CI is not part of Ho.

• This outside region is also called the rejection


region of Ho.

Lecture prepared by Ikram-E-Khuda 5


Alternate Hypothesis Ha
Upper-tailed, Lower-tailed, Two-tailed Tests

The research or alternative hypothesis can take one of three forms. An


investigator might believe that the parameter has increased, decreased
or changed. For example, an investigator might hypothesize:

Upper-tail test; it is a one tail test. In this test alternate


hypothesis or Ha is tested for greater than Ho case.

Lower-tail test; it is a one tail test. In this test alternate


hypothesis or Ha is tested for lesser than Ho case.

Two-tail test; it is a two tail test. In this test alternate


hypothesis or Ha is tested to be different than Ho case
Lecture prepared by Ikram-E-Khuda 6
Upper Tail Test
Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho

Rejection Region or
region not belonging
Confidence to Ho => region of Ha
Interval (CI)
Or
interval
𝛼
𝑡=0 +𝑡 𝑐
+𝑡 𝛼

Lecture prepared by Ikram-E-Khuda 7


Lower Tail Test
Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho

Rejection Region or
region not belonging
Confidence to Ho => region of Ha
Interval (CI)
Or
interval
𝛼
−𝑡 𝑐 𝑡=0
−𝑡 𝛼

Lecture prepared by Ikram-E-Khuda 8


Two Tail Test
Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho

Rejection Region or
region not belonging
Confidence to Ho => region of Ha
Interval (CI)
Or
interval
𝛼 𝛼
2 2
−𝑡 𝑐 𝑡=0 +𝑡 𝑐
−𝑡 𝛼 +𝑡 𝛼
2 2

Lecture prepared by Ikram-E-Khuda 9


Procedure of Hypothesis Testing
Following are some common steps to be followed in any type of hypothesis testing

1) Write down the and , separately.


:

2) Find sample statistics


This includes finding sample size, sample mean and SEM

3) Find statistics.
This includes finding value from the given sample statistics. We denote it with
(Using CLT assumption to hold true)

4) Find critical value .


This is obtained from the table using and CI or level of significance.

5) Compare to see if t statistic () is greater then, less than or unequal to depending upon .

6) Depending on (5) decide to reject or not reject null hypothesis.


– If is in the rejection region then reject
Lecture the H
prepared
o otherwise not.
by Ikram-E-Khuda 10
Procedure of One Sample T Test of Mean

1) Formulate and , separately.


:
or
or

2) Find sample statistics


This includes finding sample size (), sample mean () and SEM i.e.

3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using CLT we have,

4) Find critical value .


This is obtained from the t table using and CI.

5) Compare to see if t statistic ()is greater then, less than or unequal to depending upon .
6) Depending on (5) decide to reject or not reject null hypothesis.
– If is in the rejection region then reject the Ho otherwise not.

Lecture prepared by Ikram-E-Khuda 11


Procedure of Two Sample T Test of Means
Independent means two samples test

1) Formulate and , separately.


: or
: or
or

2) Find sample statistics


This includes finding sample size (), sample mean () and SEM i.e.
sample size (), sample mean () and SEM i.e.
3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using CLT
we have,

It is to be noted that from null hypothesis that and depending upon whether we have equal
variance or unequal variance we have t statistic given as follows:

Lecture prepared by Ikram-E-Khuda 12


Procedure of Two Sample T Test of Means
For equal variance: For unequal variance case:

4) Find critical value .


This is obtained from the table using and CI.

(for equal variance)

(for unequal variance)

5) Compare to see if t statistic () is greater then, less than or unequal to


depending upon .
6) Depending on (5) decide to reject or not reject null hypothesis.
– If is in the rejection regionLecture
thenprepared
reject the Ho otherwise not.
by Ikram-E-Khuda 13
Procedure of Two Sample T Test of Means
Dependent means two samples test

1) Formulate and , separately.


:
: or

2) Find sample statistics


This includes finding sample size (), sample mean () and SEM i.e.

3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using CLT we have,

It is to be noted from null hypothesis that

4) Find critical value .


This is obtained from the t table using df and CI

5) Compare to see if t statistic () is greater then, less than or unequal to depending upon .
6) Depending on (5) decide to reject or not reject null hypothesis.
– If is in the rejection region then reject the Lecture prepared by
Ho otherwise Ikram-E-Khuda
not. 14
Examples
One Sample and Two Sample T Test of
Means

Lecture prepared by Ikram-E-Khuda 15


Example 1
• The length of a certain lumber from a national
home building store is supposed to have a
mean length of 8.5 feet. A builder wants to
check whether the shipment of lumber she
receives has a mean length lesser than 8.5 feet.
If the builder observes that a single sample has
a mean of 8.3 feet for 61 pieces of lumber with
a sample standard deviation of 1.2 feet. What
will she conclude using a 99% CI?
Lecture prepared by Ikram-E-Khuda 16
Example 1
Key Points to Pick to Identify the Test Type
• The length of a certain lumber from a national home
building store is supposed to have a mean length of 8.5
feet. A builder wants to check whether the shipment of
lumber she receives has a mean length lesser than 8.5
feet. If the builder observes that a single sample, has a
mean of 8.3 feet for 61 pieces of lumber with a sample
standard deviation of 1.2 feet. What will she conclude
using a 99% CI?

– Since we have a single sample to test for a generally believed


truth therefore this suggests that this is a problem to be solved
by one sample t test of mean.
Lecture prepared by Ikram-E-Khuda 17
Procedure of One Sample T Test of Mean

1) Formulate and , separately.


:

This suggests that it is a lower tail and one tail test of mean,

2) Find sample statistics


In the problem it is given that
sample size , sample mean and SEM i.e.

3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using CLT we have,

4) Find critical value .


This is obtained from the t table using and CI.
At 99% CI we have 1% or 0.01 level of significance (at one tail)

From the t table we get -2.390

Lecture prepared by Ikram-E-Khuda 18


Example 1
5) Ois greater than i.e. -1.3020 > -2.390
6) Depending on (5) decide to reject or not reject null hypothesis.
– Since is not in the rejection region therefore we do not have enough statistical evidence to reject the
null hypothesis or Ho.

Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho
Rejection Region or
region not belonging
to Ho => region of Ha For

For
Confidence
Interval (CI)
Or
interval

𝛼
−𝑡 𝑠 =−1.3020 𝑡 =0
−𝑡 𝑐 =−2.3090
Lecture prepared by Ikram-E-Khuda 19
Example 1

Lecture prepared by Ikram-E-Khuda 20


Example 2
• The administrator at your local hospital states that on
weekends the average wait time for emergency room visits is
10 minutes. Based on discussions you had with friends who
have complained on how long they waited to be seen in the
emergency room over a weekend, you dispute the
administrator's claim. You decide to test your hypothesis. Over
the course of a few weekends you record the wait time for 40
randomly selected patients. The average wait time for these 40
patients is 11 minutes with a standard deviation of 3 minutes.
Do you have enough evidence to support your hypothesis that
the average emergency room wait time exceeds 10 minutes?
You opt to conduct the test at a 5% level of significance.

Lecture prepared by Ikram-E-Khuda 21


Example 2
Key Points to Pick to Identify the Test Type
• The administrator at your local hospital states that on weekends the
average wait time for emergency room visits is 10 minutes. Based on
discussions you had with friends who have complained on how long
they waited to be seen in the emergency room over a weekend, you
dispute the administrator's claim. You decide to test your
hypothesis. Over the course of a few weekends you record the wait
time for 40 randomly selected patients. The average wait time for
these 40 patients is 11 minutes with a standard deviation of 3
minutes. Do you have enough evidence to support your hypothesis
that the average emergency room wait time exceeds 10 minutes?
You opt to conduct the test at a 5% level of significance.

– Since we have a single sample to test for a generally believed truth therefore
this suggests that this is a problem to be solved by one sample t test of
mean.
Lecture prepared by Ikram-E-Khuda 22
Procedure of One Sample T Test of Mean

1) Formulate and , separately.


:

This suggests that it is a one tail and upper tail test of mean

2) Find sample statistics


In the problem it is given that
sample size , sample mean and SEM i.e.

3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using CLT we have,

4) Find critical value .


This is obtained from the t table using and CI.
At 95% CI we have 5% or 0.05 level of significance (at one tail)

From the t table we get 1.697

Lecture prepared by Ikram-E-Khuda 23


Example 2
5) Ois greater than i.e. 2.1083 > 1.697
6) Depending on (5) decide to reject or not reject null hypothesis.
– Since is in the rejection region therefore we have enough statistical evidence to reject the null
hypothesis or Ho.

Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho
For

For Rejection Region or


region not belonging
to Ho => region of Ha

Confidence
Interval (CI)
Or
interval
𝛼
𝑡=0 =2.1083
=1.697
Lecture prepared by Ikram-E-Khuda 24
Example 2

Lecture prepared by Ikram-E-Khuda 25


Example 3
• A manufacturer of light bulbs claims that his
bulbs will burn on the average 500 hours. A
customer takes a sample of 25 bulbs to test
the claim to be different from stated value of
500 hours. What conclusion should the
customer draw from a sample that has a mean
of 518 hours and a sample standard deviation
of 40 hours. Test your result at 90% CI.

Lecture prepared by Ikram-E-Khuda 26


Example 3
Key Points to Pick to Identify the Test Type
• A manufacturer of light bulbs claims that his bulbs will
burn on the average 500 hours. A customer takes a
sample of 25 bulbs to test the claim to be different from
stated value of 500 hours. What conclusion should the
customer draw from a sample that has a mean of 518
hours and a sample standard deviation of 40 hours. Test
your result at 90% CI.

– Since we have a single sample to test for a generally believed


truth therefore this suggests that this is a problem to be solved
by one sample t test of mean.

Lecture prepared by Ikram-E-Khuda 27


Procedure of One Sample T Test of Mean

1) Formulate and , separately.


:

This suggests that it is a two tail test of mean

2) Find sample statistics


In the problem it is given that
sample size , sample mean and SEM i.e.
3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using CLT we have,

4) Find critical value .


This is obtained from the t table using and CI.
At 90% CI we have 10% or 0.1 level of significance (at two tail)

From the t table we get 1.711

Lecture prepared by Ikram-E-Khuda 28


Example 3
5) Ois greater than i.e. 2.25 > 1.711
6) Depending on (5) decide to reject or not reject null hypothesis.
– Since is in the rejection region therefore we have enough statistical evidence to reject the null
hypothesis or Ho.

Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho
For

For Rejection Region or


region not belonging
to Ho => region of Ha

Confidence
Interval (CI)
Or
interval
𝛼
𝑡=0 =2.25
=1.711 =1.711
Lecture prepared by Ikram-E-Khuda 29
Example 3

Lecture prepared by Ikram-E-Khuda 30


Examples Two Samples T Test of Means

Lecture prepared by Ikram-E-Khuda 31


Example 1
• In a packing plant, a machine packs cartons with jars. It is supposed that a
new machine will pack faster on the average than the machine currently
used. An experiment was conducted to record the time taken to pack 10
cartons by new and present/ old machine. The results in seconds, are
shown in the following table. Using 99% CI , test the claim that new
machine will pack faster than old machine.
Sample 1(New Machine) Sample 2 (Old machine)
42.1 42.7
41.0 43.6
41.3 43.8
41.8 43.3
42.4 42.5
42.8 43.5
43.2 43.1
42.3 41.7
41.8 44.0
42.7 44.1
and Lecture prepared by Ikram-E-Khuda
and 32
Procedure of Two Sample T Test of Means
Independent means two samples test
1) Formulate and , separately.
: or
: or
This suggests that it is a lower tail and one tail test of means.

2) Find sample statistics


• Sample 1 sample size , sample 1 sample mean and SEM i.e. =0.2159 =0.0466
• Sample 2 sample size , sample 2 sample mean and SEM i.e. =0.2371 =0.0562

3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using CLT we
have,

Lecture prepared by Ikram-E-Khuda 33


Procedure of Two Sample T Test of Means
• It is to be noted that from null hypothesis that and
depending upon whether we have equal variance or
unequal variance we have t statistic given as follows:
• Check of variances is made by using ratio of sample
standard deviations as follows:

• This is the case of equal variances

• We proceed by finding sp

For equal variance: Lecture prepared by Ikram-E-Khuda 34


Procedure of Two Sample T Test of Means

4) Find critical value .


This is obtained from the table using and CI.

(for equal variance)

From the t table we get -2.552

Lecture prepared by Ikram-E-Khuda 35


Example 1
5) Ois lesser than i.e. -3.3988 < -2.552
6) Depending on (5) decide to reject or not reject null hypothesis.
– Since is in the rejection region therefore we have enough statistical evidence to reject the null
hypothesis or Ho.

Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho
Rejection Region or
region not belonging For
to Ho => region of Ha
For
Confidence
Interval (CI)
Or
interval
𝛼
−𝑡 𝑐 =−2.552𝑡 =0
−𝑡 𝑠 =−3.3988 Lecture prepared by Ikram-E-Khuda 36
Example 1

Lecture prepared by Ikram-E-Khuda 37


Example 2
• Independent random samples of 17 sophomores and 13 juniors attending a
large university yield the following data on grade point averages. By not
assuming equal variances at the 5% significance level, do the data provide
sufficient evidence to conclude that the mean GPAs of sophomores and
juniors at the university differ?

Lecture prepared by Ikram-E-Khuda 38


Procedure of Two Sample T Test of Means
Independent means two samples test
1) Formulate and , separately.
: or
:
This suggests that it is a two tail test of means.

2) Find sample statistics


• Sample 1 sample size 7, sample 1 sample mean and SEM i.e. =0.1226 =0.0150
• Sample 2 sample size , sample 2 sample mean and SEM i.e. =0.0824 =0.00678

3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using CLT

Lecture prepared by Ikram-E-Khuda 39


Procedure of Two Sample T Test of Means
• It is to be noted that from null hypothesis that
and we have the case of unequal variance we have
t statistic given as follows:
For equal variance:

Lecture prepared by Ikram-E-Khuda 40


Procedure of Two Sample T Test of Means

4) Find critical value .


This is obtained from the table using and CI.
• CI is 95%
• DF is calculated as follows:

From the t table we get -2.056

Lecture prepared by Ikram-E-Khuda 41


Example 2
5) Ois greater than i.e. -0.9491 > --2.056
6) Depending on (5) decide to reject or not reject null hypothesis.
– Since is not in the rejection region therefore we do not have enough statistical evidence to reject the
null hypothesis or Ho.

Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho
Rejection Region or
region not belonging For
to Ho => region of Ha
For
Confidence
Interval (CI)
Or
interval
𝛼 /2 𝛼 /2
−𝑡 𝑐 =−2.056 𝑡 =0 𝑡 𝑐 =2.056
−𝑡 𝑠 =−0.9491
Lecture prepared by Ikram-E-Khuda 42
Example 2

Lecture prepared by Ikram-E-Khuda 43


Example 3
• Trace metals in drinking water affect the flavor and an unusually
high concentration can pose a health hazard. Ten pairs of data
were taken measuring zinc concentration in bottom water and
surface water. Does the data suggest that the true average
concentration in the bottom water exceeds that of surface
water? The data obtained is as follows:

Lecture prepared by Ikram-E-Khuda 44


Procedure of Two Sample T Test of Means
Dependent means two samples test

1) Formulate and , separately.


:
: or

It suggests that it is an upper tail and one tail test of mean


2) Find sample statistics
This includes finding sample size (), sample mean () and
SEM i.e. from the new differences dataset.
This is done as follows:
Lecture prepared by Ikram-E-Khuda 45
Procedure of Two Sample T Test of Means
Sample 1 Sample 2 Differences
Dataset

0.430 0.415 0.015


0.266 0.238 0.028
0.567 0.390 0.177
0.531 0.410 0.121
0.707 0.605 0.102
0.716 0.609 0.107
0.651 0.632 0.019
0.589 0.523 0.066
0.469 0.411 0.058
0.723 0.612 0.111

The mean of it is

The standard deviation of the new difference dataset is =0.0523 => =


Lecture prepared by Ikram-E-Khuda 46
Procedure of Two Sample T Test of Means

3) Find statistics.
This includes finding value from the given sample statistics. We denote it with . Using
CLT we have,

It is to be noted from null hypothesis that

4) Find critical value .


This is obtained from the t table using df and CI
Default value of CI=95%

Hence from the t table = 1.833

5) Compare to see if t statistic () is greater then, less than or unequal to depending


upon .
6) Depending on (5) decide to reject or not reject null hypothesis.
– If is in the rejection region then reject the H o otherwise not.
Lecture prepared by Ikram-E-Khuda 47
Example 3
5) Ois greater than i.e. 4.8727 > 1.833
6) Depending on (5) decide to reject or not reject null hypothesis.
– Since is in the rejection region therefore we have enough statistical evidence to reject the null
hypothesis or Ho.

Sampling distribution of means for Ho population (normally distributed because of CLT)

Region of Ho
For

For Rejection Region or


region not belonging
to Ho => region of Ha

Confidence
Interval (CI)
Or
interval
𝛼
𝑡=0 =4.8727
=1.833
Lecture prepared by Ikram-E-Khuda 48
Example 3

Lecture prepared by Ikram-E-Khuda 49

You might also like