Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Module 3B - T Tests For A Population Mean With JASP Output

Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

Fundamentals of Hypothesis

Testing
and
tests for a population mean
(Part II)
t-test for a population mean
Learning objectives
At the end of this session, you should be able to:
1. understand the definitions used in hypothesis testing;
2. state the null and alternative hypotheses;
3. state the five steps used in hypothesis testing using the
critical value or traditional method;
4. state the five steps used in hypothesis testing using the p-
value method;
4. test means when the population standard deviation is
known, using the z-test;
5. test means when the population standard deviation is
unknown, using the t-test.
Hypothesis tests for the Mean

Hypothesis tests
for 

 Is known  Is unknown
-use z-test - use t-test
-use normal distribution - use Student’s t-distribution
Properties of the student’s t-distribution
Properties similar to the standard normal (z) distribution:
1. It is bell shaped.
2. It is symmetric about the mean.
3. The mean, median and mode are equal to 0 and are
located at the center of the distribution.
4. The curve approaches but never touches the x-axis.
Properties different from the z distribution:
1. The variance is greater than 1.
2. It is a family of curves based on degrees of freedom.
3. As the sample size increases, it approaches the normal
distribution.
Properties of the student’s t-distribution

As 𝑛 → 𝛼, 𝑡 → 𝑧.
Hypothesis tests for :  is unknown
➢ The t-test is a statistical test which can be used when
➢the population standard deviation  is unknown.
➢the population is normally distributed.

Assumptions for the t Test when  is unknown:

➢The sample is a random sample.


➢Either 𝑛 ≥ 30 or the population is normally distributed
when 𝑛 < 30.
Hypothesis tests for :  is known
➢ The formula for the t-test is:

𝑋ത − 𝜇
𝑡= , 𝑑𝑓 = 𝑛 − 1
𝑠Τ 𝑛

where: 𝑋ത is the sample mean


 is the hypothesized value of the population mean
s is the sample standard deviation
𝑛 is the sample size
Hypothesis test : Traditional method or
critical value approach
1. State the hypotheses and identify the claim. The
hypotheses can be structured in one of three ways:

2. Compute the test value or test statistic.


𝑋ത − 𝜇
𝑡=
𝑠Τ 𝑛
Hypothesis test : Traditional method

3. Find the critical value (refer to Table of critical values


for the Student’s t-distribution). Identify the critical or
rejection region.
4. Make the decision.
5. Summarize the results/make the conclusion.
Find the critical values given in each
situation.
Draw the figure and shade the rejection region. Then, find
the critical value.
1. A two-tailed test with  = 0.10 and 𝑛 = 10.
2. A right-tailed test with  = 0.05 and 𝑑𝑓 = 37.
3. A left-tailed test with  = 0.005 and 𝑑𝑓 = 40.
Find the critical values given in each
situation.
1. A two-tailed test with  = 0.10 and 𝑛 = 10.

−𝑡𝛼ൗ 𝑡𝛼ൗ
2 2
Find the critical values given in each
situation.
1. A two-tailed test with  = 0.10 and 𝑛 = 10.
We compute 𝑑𝑓 = 10 – 1 = 9.
This table gives you
the area at the tail.

𝛼 = 0.10, two-tailed

The critical t-value


when 𝛼 = 0.10, two-
tailed and df = 9 is
1.833.
Find the critical values given in each
situation.
2. A right-tailed test with  = 0.05 and 𝑑𝑓 = 37.

𝑡𝛼

In the table we are using, when  = 0.05, one-


tailed and df = 37. The critical t-value is +1.687.
Find the critical values given in each
situation.
3. A left-tailed test with  = 0.005 and 𝑑𝑓 = 40.
Rejection
region,
0.005

−𝑡𝛼

In the table we are using, when  = 0.005, one-tailed


and df = 40, the critical t-value is -2.704.
Exercises:
Answer the following problem in Exercise 8 - 3, page 95.
1. Number 3, a to h:
Hypothesis testing using the
t-test for one-sample
Example 1 using the traditional method
A researcher estimates that the average height of the buildings
of 30 or more stories in a large city is at least 700 feet. A
random sample of 10 buildings is selected, and the heights in
feet are shown. At 𝛼 = 0.025, is there enough evidence to
reject the claim?
485 511 841 725 615
520 535 635 616 582
Given:
𝜇 = 700, 𝑛 = 10, 𝛼 = 0.025
Compute the sample mean and sample std. deviation. Using
excel, use the functions “=average(array)” and “=stdeva(array)”.
The results are: 𝑋ത = 606.5 and 𝑠 = 109.08,
Example 1
We also need to check if the assumptions are met
(refer to slide #6). Assumption 1 is met (SRS). For the 2nd
assumption, we need to check for normality since 𝑛 < 30.
Using Pearson’s index of skewness, PC:
3(𝑋ത − 𝑚𝑒𝑑𝑖𝑎𝑛) 3(606.5 − 598.5)
𝑃𝐶 = = = 0.22
𝑠 109.08
Since −1 ≤ 𝑃𝐶 ≤ 1, the distribution is not significantly
skewed. Hence, we can assume normality.
Solution:
1. H0 : 𝜇 ≥ 700 (claim)
H1 : 𝜇 < 700
Example 1 using the traditional method
2. Computed value of t:
606.5 − 700
𝑡𝑐𝑜𝑚𝑝𝑢𝑡𝑒𝑑 = = −2.71
109.08Τ 10
From the table, when  = 0.025, left-tailed, df = 9, the
critical value is -2.262. The shaded region which
corresponds to the rejection region is shown.

𝛼 = 0.025

- 2.71
Example 1 using the traditional method
2. Computed value of t:
606.5 − 700
𝑡𝑐𝑜𝑚𝑝𝑢𝑡𝑒𝑑 = = −2.71
109.08Τ 10
To find the critical value of t using Excel when  = 0.025,
left-tailed and df = 9, use the function T.INV:
Example 1 using the traditional method

4. Decision:
Reject the null hypothesis since 𝑡𝑐𝑜𝑚𝑝𝑢𝑡𝑒𝑑 < 𝑡𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 .

5. There is sufficient evidence that the average height of the


buildings of 30 or more stories in a large city is less than
700 feet. The claim of the researcher is not supported.
Example 2 using the traditional method
In previous years, the mean household expenditure for
electricity was PhP5,320. An economist wanted to know
whether this amount has changed significantly. In a random
sample of 35 households, he found the mean expenditure for
electricity during the most recent year to be PhP6,480 with a
standard deviation of PhP1450. At the 0.05 level, can it be
concluded that the mean household expenditure for electricity
has changed significantly?
Given:
𝜇 = 𝑃ℎ𝑃5,320, 𝑛 = 35, 𝛼 = 0.05
𝑋ത = 𝑃ℎ𝑃6,480, 𝑠 = 𝑃ℎ𝑃1450
Example 2 using the traditional method
The t-test is appropriate for this situation since the
population standard deviation is unknown. The assumptions
are met since the sample is random and the size is at least
30.
Solution:
1. H0 : 𝜇 = 5,320
H1 : 𝜇 ≠ 5,320 (claim)
2. Computed value of t:
6480 − 5320
𝑡𝑐𝑜𝑚𝑝𝑢𝑡𝑒𝑑 = = 4.73
1450Τ 35
Example 2 using the traditional method
3. From the table, when  = 0.05, two-tailed, df = 34, the
critical value is 2.032. The shaded region which
corresponds to the rejection region is shown.

−2.032 2.032 4.73


Example 2 using the traditional method
Use Excel, use the function “T.INV.2T” to find the critical
value. Given  = 0.05, two-tailed and df = 34, the critical
value is ±2.032.
Example 2 using the traditional method

4. Decision: Since 𝑡𝑐𝑜𝑚𝑝 > +𝑡𝑐𝑟𝑖𝑡𝑖𝑐𝑎𝑙 , the null hypothesis is


rejected.

5. Conclusion:
There is sufficient evidence that the mean household
expenditure for electricity has changed significantly.
Hypothesis test : p-value method
1. State the hypotheses and identify the claim. The
hypotheses can be structured in one of three ways:

2. Compute the test value or test statistic.


𝑋ത − 𝜇
𝑡=
𝑠Τ 𝑛
Hypothesis test : p-value method
3. Use the t-distribution table to determine the probability
or p-value that corresponds to the computed value
obtained in step 2.
4. Make the decision. If p-value < , reject 𝐻𝑜 .
5. Summarize the results/make the conclusion.
Find the P-value given in each situation.
Determine the decision as well.
Draw the figure and shade the rejection region. Mark the
position of the computed value of t. Then, find the interval
of the p-value associated with the computed value of t.
Write the decision as well.
1. Computed t = 3.183, right-tailed test with 𝑑𝑓 = 6 and
 = 0.05.
2. Computed t = 1.945, two-tailed test with 𝑑𝑓 = 27 and
 = 0.01.
3. Computed t = -1.145, left-tailed test with 𝑛 = 5 and
 = 0.01.
Find the p-value #1
Computed t = 3.183, right-tailed test with 𝑑𝑓 = 6 and  = 0.05.
Go to the next slide to find out
where to get this interval.

0.005 ≤ 𝑃 ≤ .01

3.183

Decision: Since P < , reject the null hypothesis.


Find the p-value #1
1. Locate df = 6.
Where to get the p-value interval:
2. The computed value of 3.813
is between 3.143 and 3.707.

3. The one-tailed p-values


corresponding to 3.143 and
3.707 are 0.01 and 0.005.

4. We write the interval as:


0.005 ≤ 𝑃 ≤ 0.01.
How to get the exact p-value for problem 1.
Given computed t = 3.183, right-tailed test with 𝑑𝑓 = 6
and  = 0.05, the exact value of P may be obtained using
interpolation. Based on the results in previous slide, when
𝑑𝑓 = 6, one-tailed:
t values P-values We can solve for p from the following equation:
3.707 0.005
𝑃 − 0.005 3.183 − 3.707
3.183 P =
.01 − .005 3.143 − 3.707
3.143 .01
−0.524
𝑃 − 0.005 = (.01 − .005)
−0.564
𝑃 = 0.00965

Decision: Since 𝑃 < , reject the null hypothesis.


Find the p-value #2
Computed t = 1.945, two-tailed test with 𝑑𝑓 = 27 and  = 0.01.

1.945
0.05 ≤ 𝑃 ≤ 0.10

Decision: Since P > ,


do not reject the null hypothesis.
Find the p-value # 3
Computed t = -1.625, left-tailed test with 𝑛 = 5 and  = 0.01.

-1.625

0.05 ≤ 𝑃 ≤ 0.10

Decision: Since P > ,


do not reject the null hypothesis.
Example 3 using the p-value approach
A certain webpage indicated that, on the average, Filipino
Internet users visit 36 websites a month. A random sample
of 42 Filipino Internet users yielded a sample mean of 42
with a standard deviation of 5.3. At the 0.01 level of
significance, can it be concluded that this differs from the
national average?

Given:
𝜇 = 36, 𝑛 = 42, 𝛼 = 0.01
𝑋ത = 42, 𝑠 = 5.3
Example 3
The t-test is appropriate for this situation since the
population standard deviation is unknown. The assumptions
are met since the sample is random and the size is at least
30.
Solution:
1. H0 : 𝜇 = 36
H1 : 𝜇 ≠ 36 (claim)
2. Computed value of t:
42 − 36
𝑡𝑐𝑜𝑚𝑝𝑢𝑡𝑒𝑑 = = 7.337
5.3Τ 42
Example 3 using p-value approach
3. In the table we are using, when the computed value is
𝑡 = 7.337, two-tailed with df = 41, the p-value is less
than 0.01.

The computed value of


7.337 is greater than 2.701.
Therefore, the P-value
associated with 7,337 is
less than 0.01.
Example 3 using p-value approach

4. Decision: Since 𝑝 < , the null hypothesis is rejected.


5. Conclusion:
There is sufficient evidence that the number of websites
visited by Filipino Internet users per month is different from
the national average of 36.
Find the P-value given in each situation
using Excel
1. Computed t = 3.183, right-tailed test with 𝑑𝑓 = 6 and
 = 0.05.
Use the function “=T.DIST.RT(x,deg_freedom)”.
Find the P-value given in each situation
using Excel
2. Computed t = 1.945, two-tailed test with 𝑑𝑓 = 27 and
 = 0.01.
Use the function “=T.DIST.2T(x,deg_freedom)”.
Find the P-value given in each situation
using Excel
3. Computed t = -1.145, left-tailed test with 𝑛 = 5 and
 = 0.01.
Use the function “=T.DIST(x,deg_freedom,cumulative)”
Example 4 using the p-value approach
Twenty Accountancy majors were administered with a test
on self-image. Their scores have a mean of 89 and a
standard deviation of 23. If in general, student scores on
this test are approximately normal with a mean of 81, can
we conclude at the 0.05 level that the Accountancy majors
have better self image than other students?
Given:
𝜇 = 81, 𝑛 = 20, 𝛼 = 0.05
𝑋ത = 89, 𝑠 = 23
Example 4
The t-test is appropriate for this situation since the
population standard deviation is unknown. The assumptions
are met since the sample is random and although the size is
less than 30, the scores are approximately normal.
Solution:
1. H0 : 𝜇 ≤ 81
H1 : 𝜇 > 81 (claim)
2. Computed value of t:
89 − 81
𝑡𝑐𝑜𝑚𝑝𝑢𝑡𝑒𝑑 = = 1.556
23Τ 20
Example 4 using the p-value approach
3. From the table, when the computed value is t = 1.556,
one-tailed with df = 19, the P-value is between 0.05
and 0.10.
Example 4 using the p-value approach

4. Decision: We found 0.05 ≤ 𝑝 ≤ 0.10. Since 𝑝 > , the


null hypothesis is not rejected.
5. Conclusion:
There is no sufficient evidence that the Accountancy
majors have better self image than other students.
Example 1 using the p-value method in JASP
A researcher estimates that the average height of the buildings
of 30 or more stories in a large city is at least 700 feet. A
random sample of 10 buildings is selected, and the heights in
feet are shown. At 𝛼 = 0.025, is there enough evidence to
reject the claim?
485 511 841 725 615
520 535 635 616 582

Encode the values in one column in Excel. Save the file in


CSV (comma delimited) type.
Example 1 using the p-value method in JASP
Solution:
1. H0 : 𝜇 ≥ 700 (claim)
H1 : 𝜇 < 700

Use left-tailed test and


0.025 level of significance.

Do not forget to
check this because
n < 30!!!
JASP output

If p>0.05, there is
no deviation from
normality.
Therefore, we
can use t-test.
Example 1 using the traditional method
2. Based on the output of JASP,
computed 𝑡 = −2.71 and 𝑝 = 0.012 .

3. Decision: Reject the null hypothesis since 𝑝 < 𝛼.

5. There is sufficient evidence that the average height of the


buildings of 30 or more stories in a large city is less than
700 feet. The claim of the researcher is not supported.
Exercises:
Bibliography:
• Fundamentals of Statistics 3rd Edition
Michael Sullivan III © 2011by Pearson Education Inc.

• Statistical Analysis with Software Applications


create®, © 2019 by McGraw-Hill Education

You might also like