0% found this document useful (0 votes)
22 views39 pages

Topic6 - One-Sample Z-Test & T-Test - Rhea Ruiz

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views39 pages

Topic6 - One-Sample Z-Test & T-Test - Rhea Ruiz

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

HYPOTHESIS

TESTING

ONE-SAMPLE T-TEST (SMALL


SAMPLES)
&
ONE-SAMPLE Z-TEST (LARGE
SAMPLES)
LEARNING
OUTCOMES
• Difference between one-sample Z-test and one-

sample T-test

• Learn to perform and interpret a one sample t-test and

z-test using SPSS and excel


DEFINITION & PURPOSE

• The one-sample t-test is a statistical


• A one-sample z-test is a statistical
test used to determine if a sample
test used to determine if a sample
mean is significantly different from a
mean is significantly different from a
known population mean. It is used
known population mean. It is used
when the population standard
when the population standard
deviation is unknown and must be
deviation is known.
estimated from the sample data.
• Our sample size is large n ≥ 30
• Our sample size is small, n < 30
ASSUMPTIONS

T-TEST • the z-test assumes that the


• Random sample population standard deviation is
• continuous data known.
• Normally distributed data or your • sample size is large n ≥ 30
sample has more than 20 observations • The data must approximately fit a
• Independent observations normal distribution, otherwise the test
doesn't work.
• FORMULA: • Parameters such as variance and
(Sample mean – Population mean) / standard deviation should be
(Sample SD / √n) calculated for a z-test to be performed.
• FORMULA:
(Sample mean – Population mean) /
(Population SD / √n)
ONE-SAMPLE T- TEST IN
SPSS Step
1:
• Interest in Height
• We want to know our sample mean
differ from the national average.
• RQ: Does diet affect the average
height of children ?
• Compare group sample mean to
another known mean.
Literature review: AVERAGE HEIGHT IS
65
Step
• Select the Height
2: and move to test
variables

Add the known


population mean 65
to the test value and
click OK
Step
• The p-value is
3:
greater than the
significant level.
Descriptive We fail to reject
statistics the null
hypothesis.
Therefore , the
Inferential mean of our
statistics sample are not
different from
our national
average of 65
ONE-SAMPLE Z-TEST IN
SPSS Step
1:
• Example:
We need to determine if the BSA students with a mean of
105 is higher than 100 average score in the exam. We have
the information that the standard deviation for students
scores is 15. So, we collect the data of 35 students by using
random samples and record their marks. Finally, we also set
our ⍺ value (significance level) to be 0.05.

The null hypothesis would be: H0: μ = 100


The alternative hypothesis would be: Ha: μ ≠ 100
• N -35
• Sample mean -105 • Reminder, we cannot directly do a z-test in SPSS
z = (105 - 100) / (15 / √35) = 1.97203
• Population mean-100 without the syntax code
• Population SD- 15
Step
2:

• Search the syntax code


of how2stats page in
Google and copy it
and then paste it to
your syntax.
Step
3:
• The highlighted
number is the one
that we should
manipulate.
• N -35
• Sample mean -105
• Population mean-100
• Population SD- 15
Step
4:
• Select the
complete code
that you want to
run and click
the run button.
Interpretation
• The p- value is lower than
the significant level,
therefore, we rejected the
null hypothesis.
• This mean that our
sample is taken from
different population than
normative sample
population
• It is statistically different
from a 100
Coherens_d
The sample mean is .3333
ONE-SAMPLE T-TEST IN Step
EXCEL 1: the mean of the
• Find
score
Interested on score of the BSA
students
The hypothesized mean is 80
Step
2:
• Find the standard
deviation of the
score.
Step
3:
• Count the of
the scores.
Step
4:
• Find the
standard error
of mean.
Step
5:
• Find the degree
of freedom.
Step
6:
• Input the
hypothesized
mean or the
population
mean which is
80
Step
7:
• Find the t-
statistic of the
scores.
Step
8:
• Find the p-value
of the scores.
• You can choose
whether 1-
tailed or 2-
tailed
distribution.
• P- value is greater
than the
significant level.
Therefore, we fail
to reject the null
hypothesis and
there is no
significant
difference
between the
scores of BSA to
ONE-SAMPLE Z-TEST IN Step
EXCEL 1: a dummy sample
• Create
variable and put at least 0 in
• We're interested on age of the it.
BSA students
• The population mean is 23
Step
• 2:
Go to Data
Analysis
Step
•3:Select the z-
test two
sample for
mean.
Step
• For variable 1 range select
4:
the actual Data (Age)
• For variables 2 range select
the Dummy data.
• For Hypothesized mean
input the parameter 23
from the hypothesis.
• Since the population SD is 5
so the variable 1 is 5² =25
• We have zero in variable 2
but the excel won't accept
zero so we will input a very
small value closer to zero
which is .00001, so its effect
is insignificant.
• Check the labels
Step
• Delete the
5:
DUMMY variable
because we don't
need it anymore.
• Change the title
to ONE SAMPLE
FOR MEANS
• Remove the word
DIFFERENCE in
hypothesized
mean.
Step
6: up output
• Cleaned
output from excel
Interpretation
INTERPRETATION OF Z-TEST & T-TEST RESULTS

• Statistical decision in hypothesis • If the computed value of the test statistic falls
testing is either to reject or accept within the critical region, the null hypothesis
the null hypothesis. is rejected.
• Another method is to look for the p- • If the statistical decision is to reject the null
hypothesis, conclude that there is a significant
value (< .𝟎𝟓) means reject the null
value of the test statistic. Smaller p-
difference between the sample mean and the
population mean.
hypothesis. Larger p-value we fail
• On the other hand, if the computed value lies
to reject the Null Hypothesis.
within the acceptance region, then do not
reject the null hypothesis.
• If the decision is accept the null hypothesis, then
the interpretation is that we have to say that
there is no sufficient evidence to conclude
whatever is stated in the alternative hypothesis.
STRENGTHS AND LIMITATIONS

One-Sample Z-Test One-Sample T-Test


Strengths: Strengths:
• Simple to Calculate: When the population • More Versatile: It can be used when the
standard deviation is known, the z-test is population standard deviation is unknown,
relatively straightforward to calculate. which is the case in most practical situations.
• Powerful When Population Standard Deviation is • Robust to Departures from Normality: It
Known: It's a powerful test for determining if a performs reasonably well even when the data
sample mean differs significantly from a known is slightly non-normal.
population mean. Limitations:
Limitations: • Requires Larger Sample Sizes: Compared to
• Requires Known Population Standard Deviation: the z-test, the t-test typically requires larger
The z-test is only appropriate when the sample sizes to achieve the same level of
population standard deviation is known. This is statistical power.
often not the case in real-world scenarios. • More Complex Calculations: The t-test
• Less Common in Practice: Because the involves calculating the sample standard
population standard deviation is rarely known, deviation, which adds a step to the
the z-test is less commonly used than the t-test. calculation process.
PPRACTICAL EXAMPLES
1. Product Quality Control:
A company manufactures light bulbs that are supposed to have an average lifespan of 1000 hours.
They take a random sample of 50 bulbs and find the average lifespan is 980 hours. Knowing the
population standard deviation of bulb lifespans is 100 hours, they can use a one-sample z-test to
see if there's evidence that the average lifespan of their bulbs is actually lower than advertised.

Hypotheses:
Null Hypothesis (H0): μ = 1000 (The average lifespan is 1000 hours)
Alternative Hypothesis (H1): μ < 1000 (The average lifespan is less than 1000 hours)
Calculations:
- Sample mean (x̄) = 980
- Population mean (μ) = 1000
- Population standard deviation (σ) = 100
- Sample size (n) = 50
Decision:
Using a z-table, the p-value for z = -1.41 is approximately 0.079. Since this p-value
(0.079) is greater than 0.05, we do not reject the null hypothesis. There is insufficient
evidence to conclude that the average lifespan is less than 1000 hours.
2. Student Performance:
A teacher believes their students are scoring higher on a standardized test than
the national average of 75%. They administer the test to their class of 30 students
and find the average score is 80%. Using a one-sample z-test and the known
national standard deviation of 10 points, they can determine if their students are
performing significantly better than the national average.
Hypotheses:
- Null Hypothesis (H0): μ = 75 (The average score is 75%)
- Alternative Hypothesis (H1): μ > 75 (The average score is greater than
75%)
Calculations:
- Sample mean (x̄) = 80
- Population mean (μ) = 75
- Population standard deviation (σ) = 10
- Sample size (n) = 30
Decision:
The p-value for z = 2.74 is approximately 0.003. Since this p-value
Imagine a company that produces bags of flour. They claim that each bag weighs
500 grams on average. To verify this claim, they randomly sample 100 bags of flour
and find that the average weight is 495 grams. Assuming the population standard
deviation is known to be 10 grams, we can use a one-sample z-test to determine if
there is enough evidence to reject the company's claim.
Hypothesis
Null Hypothesis: The average weight of the flour bags is 500 grams (H0: μ
= 500).
Alternative Hypothesis: The average weight of the flour bags is not 500
grams (H1: μ ≠ 500).
Test Statistic:
We calculate the z-score using the formula: z = (sample mean - population
mean) / (population standard deviation / square root of sample size). In
this case, z = (495 - 500) / (10 / sqrt(100)) = -5.
P-Value:
In this case, the p-value is very small, likely less than 0.0001.
Decision:
A manufacturing company wants to evaluate the effectiveness of a new production process
for manufacturing screws. The company knows that the average length of screws produced
using the old process is 2.5 cm. They implement the new process and collect a sample of 20
screws to measure their lengths. Assume the sample mean length of the 20 screws is 2.6 cm,
and the sample standard deviation is 0.1 cm.
- Which test to use? We are comparing the mean length of a sample of screws to a known
population mean (2.5 cm). The population standard deviation is unknown, and the sample
size is small (n = 20). Therefore, we can use a one-sample t-test for means.
Hypotheses:
- H0: μ = 2.5 (The average length of screws produced using the new process is the
same as the old process)
- H1: μ ≠ 2.5 (The average length of screws produced using the new process is
different from the old process)
Calculations:
t = (x̄ - μ) / (s / √n) = (2.6 - 2.5) / (0.1 / √20) ≈ 4.47
Decision:
Using a t-table with 19 degrees of freedom (n - 1), the p-value for t = 4.47 is
extremely small (0.000262). Since this p-value is less than 0.05, we reject the null
hypothesis. There is strong evidence to suggest that the new manufacturing
A company wants to test the claim that their batteries last more
than 40 hours. Using a simple random sample of 15 batteries
yielded a mean of 44.9 hours, with a standard deviation of 8.9
hours. Test this claim using a significance level of 0.05.

Because our p-value is smaller


than our significance level, we
reject our null hypothesis.
We have significant evidence
to conclude the company’s
claim that their batteries last
more than 40 hours.
A researcher reads a paper introducing a new test of executive function. The
authors of the

paper had tested 30 healthy volunteers and found that on average they score
51 on the new

test. The researcher believes that patients with schizophrenia will score less
than the normal

average on this test of executive function. They test 22 patients with


schizophrenia. The

average score for the patients is 39 with a standard deviation of 4.3. Is there
significant

evidence at the 5 % level to support the researcher’s claim?


EXAMPLE1.
Suppose we want to know whether or not the mean weight of a certain species of turtle is
equal to 310 pounds. Assume that the
Sample size n = 40
Sample mean weight x = 300
Sample standard deviation s = 18.5

HYPOTHESIS
H0: μ = 310 (population mean is equal to 310 pounds)
H1: μ ≠ 310 (population mean is not equal to 310 pounds)

t = (x – μ) / (s/√n) = (300-310) / (18.5/√40) = -3.4187

the p-value associated with t = -3.4817 and degrees of freedom = n-1 = 40-1 =
39 is 0.00149.

Since this p-value is less than our significance level α = 0.05, we reject the null
hypothesis. We have sufficient evidence to say that the mean weight of this
species of turtle is not equal to 310 pounds.
Example 2.
Previous research has found an auditory detection threshold of 3.24 dB for a certain

auditory stimulus, with a standard deviation of 1.22 dB. This research used the method of

constant stimuli. Using a staircase method with 16 participants, the auditory detection

threshold for the same stimulus is found to be 2.89 dB. Is there any evidence using the new

method to suggest the original result was incorrect?

𝐻0: 𝜇 = 3.24
Hypothesis:

𝐻1: 𝜇 ≠ 3.24
𝜎 = 1.22
𝑥= 2.89

𝑃(𝑍 ≤ −1.111) = 0.1333 > 0.025


Z= 2.89- 3.24 / 1.22/√15 = 1.111
Example 3.
Psychology student, Sarah, is giving out sleep diaries to her university friends to monitor

the number of hours of sleep they have each night. Sarah believes that university
students

𝐻0: 𝜇 =
sleep for 6 hours per night on average. Below is the data that they collected. The
number of the p-value associated with t = 0.8115

𝐻1: 𝜇
and degrees of freedom = n-1 = 10-1 = 9
6
is 0.4380
hours sleep per night for each student was averaged over a one month monitoring
We do not reject the null hypothesis,
period. Is Mean= 6.31 therefore, our result is not significant
≠6
Sample and we have no evidence to reject the
there any evidence to suggest that Sarah’s belief isnull
incorrect?
hypothesis that students sleep for 6
Standard hours on average.
deviation=
1.208
T= 6.31 - 6 / 1.208/√10
= 0.8115

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy