T Test
T Test
Research methodology
• A t-test is an
inferential statistic u
sed to determine if
there is a significant
difference between
the means of two
groups and how
they are related.
= difference mean
Numerical
• Number of student enrolled in Anganwadi, before and after
awareness program in rural area of malihabad
SCHOOL BEFORE AWARENESS PROGRAM AFTER AWARENESS PROGRAM
School 1 22 24
School 2 20 22
School 3 19 19
School 4 24 22
School 5 25 28
School 6 25 26
School 7 28 28
School 8 22 24
School 9 30 30
School 10 27 29
School 11 24 25
School 12 18 20
School 13 16 17
School 14 19 18
School 15 19 18
School 16 28 28
School 17 24 26
School 18 25 27
School 19 25 27
School 20 23 24
SCHOOL BEFORE AWARENESS PROGRAM AFTER AWARENESS PROGRAM Difference
School 1 22 24 -2
School 2 20 22 -2
School 3 19 19 0
School 4 24 22 2
School 5 25 28 -3
School 6 25 26 -1
School 7 28 28 0
School 8 22 24 -2
School 9 30 30 0
School 10 27 29 -2
School 11 24 25 -1
School 12 18 20 -2
School 13 16 17 -1
School 14 19 18 1
School 15 19 18 1
School 16 28 28 0
School 17 24 26 -2
School 18 25 27 -2
School 19 25 27 -2
School 20 23 24 -1
-19/20= -0.95
DIFFERENCE(X) X-X̅ (X-X̅)^2
-2
-1.05 1.1025
-2
-1.05 1.1025
0
0.95 0.9025
2
2.95 8.7025
-3
-2.05 4.2025
-1
-0.05 0.0025
0
0.95 0.9025
-2
-1.05 1.1025
0
0.95 0.9025
-2
-1.05 1.1025
-1
-0.05 0.0025
-2
-1.05 1.1025
-1
-0.05 0.0025
1
1.95 3.8025
1
1.95 3.8025
0
0.95 0.9025
-2
-1.05 1.1025
-2
-1.05 1.1025
-2
-1.05 1.1025
-1
-0.05 0.0025
=-19
Total =32.95
Mean =-19/20=.95
Now,
11
Unpaired data (independent data)
𝑥1 − 𝑥2
𝑡=
√
2 2
𝑠1 𝑠 2
+
𝑛1 𝑛2
Numerical:
• Perception of visitor and resident for availability of level of service in
trans Gomti Nagar area on scale of 1-10.
• Tourist – 7 2 9 8
• Resident - 1 2 3 4
/n
√ ∑ 𝑥−𝑥 2
( )
𝑆=
𝑛 −1
So,
n1= 4
ҳ̅̅=7+2+9+8= 26/4 =6.5
And,
n2=4
x2 = 4
= 1+2+3+4 = 10/2= 5
x1 x2 x1-ҳ̅̅ (x1-ҳ̅̅)2 X2 - (X2 - )2
7 1 0.5 0.25 -1.5 2.25
=29 =5
• s1 • s2
• s1 • s2
• s1= 3.11 • s2= 1.29
Now,
𝑥1 − 𝑥2
𝑡=
√
2 2
𝑠1 𝑠 2
+
𝑛1 𝑛2
t= 2.39
(Both the Z test and Student's t-test have similarities in that they both help determine the significance of a set of data.)
The steps to perform the z test are as follows:
• Set up the null and alternative hypotheses.
• Find the critical value using the alpha level and z table.
• Calculate the z statistic.
• Compare the critical value and the test statistic to decide whether to
reject or not to reject the null hypothesis
One sample Z test:
Two sample Z test:
Question
• The planner of twin city claims that the travel time b/w center of city
A to center point of city B is less than 2 hrs that means 120 min. with
standard deviation of 30 min. so, is there enough evidence to support
this claim at 0.05 significance level if 49 trips were examined with a
mean of 100 minutes.
• Given:
• Sample size n = 49
• σ = 30
Steps:
1- Set up the null and alternative hypotheses.-
H0 : the travel time will be =120 min.
H1 : the travel time
will be <120
Z (critical)= -1.645
* There are three different types of hypothesis tests:
• Two-tailed test: The alternative hypothesis contains the “≠” sign
• Left-tailed test: The alternative hypothesis contains the “<” sign
• Right-tailed test: The alternative hypothesis contains the “>” sign
• Calculate the z statistic.
• x1̄ = 750, σ1 = 20
• x2̄ = 780, σ2 = 25
• H0: There is no difference between the performance of employees at
different office.
• H1: There is a difference in the performance of the employees
Given,
The researcher can hypothesized that performance difference between total population of office is negligible, so
=0
= 750- 780
( 𝑥 1 − 𝑥 2 ) − ( 𝜇 1 − 𝜇2 )
Z=
√
2 2
𝜎1 𝜎2
+
𝑛1 𝑛2
√ 400 625 value is lot less than the critical value of 0.05, the result is statistically
+ significant and hence you can reject the null hypothesis.
30 30
Correlation :
• Correlation is a statistical measure that expresses the extent to
which two variables are linearly related (meaning they change
together at a constant rate). It's a common tool for describing simple
relationships without making a statement about cause and effect.
T test