0% found this document useful (0 votes)
667 views35 pages

T Test

Here are the key steps for a two-sample z-test: 1. State the null and alternative hypotheses: H0: There is no difference in average performance between the two cities H1: There is a difference in average performance between the two cities 2. Calculate the sample means, standard deviations and sample sizes for each city: - City A: Mean = x̄1, Standard Deviation = s1, Sample Size = n1 - City B: Mean = x̄2, Standard Deviation = s2, Sample Size = n2 3. Calculate the pooled standard deviation: spool = √((s12(n1-1) + s22

Uploaded by

Diksha Singh
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)
667 views35 pages

T Test

Here are the key steps for a two-sample z-test: 1. State the null and alternative hypotheses: H0: There is no difference in average performance between the two cities H1: There is a difference in average performance between the two cities 2. Calculate the sample means, standard deviations and sample sizes for each city: - City A: Mean = x̄1, Standard Deviation = s1, Sample Size = n1 - City B: Mean = x̄2, Standard Deviation = s2, Sample Size = n2 3. Calculate the pooled standard deviation: spool = √((s12(n1-1) + s22

Uploaded by

Diksha Singh
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/ 35

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.

• It is used when n<30


Types of t test
• T test for small sample size
• T test for paired samples
The t-test is a test
used for hypothesis
testing in statistics.
Calculating a t-test
requires three
fundamental data
values including the
difference between
the mean values
from each data set,
the standard
deviation of each
group, and the
number of data
values.
PAIRED(DEPENDENT ) T TEST

= 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,

Degree of freedom = (n-1)


=19
(unpaired) Independent
• The independent-measures hypothesis test allows researchers to evaluate
the mean difference between two populations using the data from two
separate samples.
• The identifying characteristic of the independent-measures or between-
subjects design is the existence of two separate or independent samples.
• Thus, an independent-measures design can be used to test for mean
differences between two distinct populations.

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

2 2 -4.5 20.25 -0.5 0.25

9 3 2.5 6.25 0.5 0.25

8 4 1.5 2.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

Degree of freedom = n1 +n2 -2


• The t-test produces two values as its output: t-value and degrees of freedom. The t-value, or t-score, is
a ratio of the difference between the mean of the two sample sets and the variation that exists within
the sample sets.
• The numerator value is the difference between the mean of the two sample sets. The denominator is
the variation that exists within the sample sets and is a measurement of the dispersion or variability.
• This calculated t-value is then compared against a value obtained from a critical value table called the
T-distribution table. Higher values of the t-score indicate that a large difference exists between the
two sample sets. The smaller the t-value, the more similarity exists between the two sample sets.
• T-Score
• A large t-score, or t-value, indicates that the groups are different while a small t-score indicates that
the groups are similar.
• Degrees of freedom refer to the values in a study that has the freedom to vary and are essential for
assessing the importance and the validity of the null hypothesis. Computation of these values usually
depends upon the number of data records available in the sample set.
Z – Test:
• A z-test is a statistical test to determine whether two population
means are different when the variances are known and the sample
size is large. A z-test is a hypothesis test in which the z-statistic
follows a normal distribution. A z-statistic, or z-score, is a number
representing the result from the z-test.

(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

2- Find the critical value using the alpha level


and z table.

In one tailed test *, At 90 % confidence level


and at 0.05 significance level

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.

• Here, = 100, = 120, n = 49, σ = 30


•=
•=
• = =-20/4.28
• Z= -4.67
• Z score =-4.67
• Compare the critical value and the test statistic to decide whether to
reject or not to reject the null hypothesis

• NOW -4.67 IS < -1.67 , SO THE NULL HYPOTHESIS IS REJECTED


QUESTION:
• To study the performance of organization structure of municipality
office of tier -2 cities, 2 offices were identified. Randomly 30
employee were selected from both cities. The following data also
obtained from the office.

• 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

− 30 − 0 At a significance level of 0.05, the p-value is less than 0.00001. As the p-


Z= =-5.13

√ 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

You might also like