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

Z-test-and-T-test

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

EM 315 – Engineering Data Analysis

Z-test and T-test


Z-test and T-test
• Z-test is a statistical analysis tool that measures the average mean of two
large data samples when the standard deviation is known. It only applies to
a population that follows a normal distribution; It is typically used when the
data samples are greater than 30

• A T-test is the final statistical measure for determining differences between


two means that may or may not be related. The testing uses randomly
selected samples from the two categories or groups. It is a statistical method
in which samples are chosen randomly, and there is no perfect normal
distribution. When the data samples are less than 30 t-test is applied.
Z-test
• Again, t-test are not conducted for large datasets; on the other hand, z-tests do not work if
the sample size is too small. There is a minimum limit of 30; if the sample size is above 30.
Thus, experiments that feature less than 30 subjects are referred to as a small sample size.
• Before venturing further into the test, let us quickly examine hypothesis testing. Hypothesis
testing ascertains whether a particular assumption is true for the whole population. It is a
statistical application. It determines the validity of inference by evaluating sample data from
the overall population.
• The concept of hypothesis works on the probability of an event’s occurrence. It confirms
whether the primary hypothesis results are correct or not. In research, it is very important to
eliminate randomness. The data should not have been caused by chance or a random factor.
Hypothesis testing eliminates such uncertainties
• Statistical Hypothesis → It is a conjecture or statement about the nature of the population it
can be either true or false
2 Types of Statistical Hypothesis:
1. Null Hypothesis → Predict something to be true or we consider things to be true until proven wrong → 𝐻𝑂
2. Alternative Hypothesis → Contradiction of Null Hypothesis it predicts something to be false until proven true → 𝐻𝑎
Z-test
Depending on the data parameters, a z-test can be a left-tailed, right-tailed, or two-
tailed hypothesis test. Z-tests are similar to t-tests, except t-tests are employed when the
sample size is smaller. The calculation of the z-trial outputs a z-score that defines the
position from the mean.
Z-test
• The z-test is used for hypothesis testing. When the variance is provided, it
determines the average mean of large data samples
• Using null and alternative hypotheses helps compare two data populations,
the difference between them, and the z-score.
• Z-trials are further categorized into two types. The one-sample test compares
a single sample average with the population means. On the other hand, the
two-sample test compares the average mean of two samples.
1. We perform One Sample Z-test When we want to compare a Sample
Mean with the population mean.
Z-test – Example A
The Electronics Engineering students at the College of Engineering and Architecture can
score an average of 80. The following are the data for score of 44 Electronics Engineering
students BSECE-1B

ECE students can score an average score of


80
ECE students can’t score an average score of 80
Z-test
z = −0.6053
𝛼 = 0.05
Critical value = −1.645
Since the critical value is lesser than
the z score, by left-tailed test we
accept the null hypothesis
∴ 𝑤𝑒 𝑓𝑎𝑖𝑙 𝑡𝑜 𝑟𝑒𝑗𝑒𝑐𝑡 𝑡ℎ𝑒 𝑛𝑢𝑙𝑙 ℎ𝑦𝑝𝑜𝑡ℎ𝑒𝑠𝑖s

Since we fail to reject the null


hypothesis we conclude that the ECE
students can score an average score of
80

Critical Table
Z-test
2. We perform a Two-sample z-test when we want to compare the mean of
two samples.
Z-test – Example B
The given data is the result of two section of Electronics Engineering at CSPC, we will find out if
section B perform better than section E
BSECE – 1B

BSECE – 1E
Z-test – Example B
Calculating the z score with a significance
level of 5%
Z = 3.28

@ 5% significance level
Critical value = ± 1.960
Note: we use a two-tailed test
because we comparing two
groups

Findings: Since the z score is greater than the critical value, by two Conclusion: Since the null hypothesis is rejected we
tailed-test we will reject the null hypothesis and accept the concluded that section B can perform better than
alternative hypothesis section E
T-test
• T-test is applied when the sample data is less than 30, hence we can’t apply t-test for data larger than 30
and the standard deviation is unknown. Although T-test is just the same as Z-test they are both applicable in
determining the statistical hypothesis. T-test and Z-test just differ in the application in terms of data size.
Z-test or T-test?

Yes

Sample size > 30

No Yes

Use T-test Use Z-test


T-test – Example C
In the population of first-year Electronics Engineering students can achieve a score of 75 in a major exam
conducted online.
The data of exam results of five sections are collected in google forms:
BSECE 1A BSECE 1B BSECE 1C

BSECE 1D BSECE 1E
• And pick 25 score result of students, 5 per section

Conclusion: Since the null hypothesis is not rejected we conclude


Findings: Since the t score is greater than the that the first yr. ECE students can achieve a score of 75 thru online
critical value we fail to reject the null hypothesis

You might also like