CLG Project Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Z-TEST AND T-TEST

NAME : RUCHI SHARMA


BRANCH- BBA
SEC- B
REG N0- 210409120094
10/04/2023

BUISNESS RESEARCH

DR SABYASACHI DEY

defination

A z-test is used to test a Null Hypothesis


if the population variance is known, or if
the sample size is larger than 30, for an
unknown population variance. A t-test is
used when the sample size is less than
30 and the population variance is
unknown

REPORT TITLE PAGE 2


What is the difference between TF and z-test?
T -test refers to a type of parametric test that is
applied to identify, how the means of two sets
of data differ from one another when variance
is not given. Z-test implies a hypothesis test
which ascertains if the means of two datasets
are different from each other when variance is
given.

What is a two sample


z-test example?
Comparing the performance of students in two different
classes. Comparing the average salaries of men and
women in a company. Comparing the KPIs of two
different teams.

REPORT TITLE PAGE 3


Z-TEST
z-test is applied when the test statistic follows normal distribution
Uses of z-test are
1. To test the given population mean when the sample is large or
when the population SD is known
2. To test the equality of two samples means when the sample
are large or when the population SD is known.
3. To test the population proportion.
4. To test the equality of two samples
5. To test the population SD when the sample is large.
6. To test the equality of two sample standard deviation when the
samples are large or when population standard deviation are
known.
7. To test the equality of correlation coefficient.

Assumptions
in Z -

test
are:
Assumptions in Z -test are:

REPORT TITLE PAGE 4


I. Sampling distribution of test statistic is normal
II. Sample statistic are close to the population parameter of
therefore for finding standard error , sample statistics
are used in places where population parameter are to be
used.

REPORT TITLE PAGE 5


T-TEST
t-test is applied when the statistic follows t-distribution.
Applications (uses) of t-test are;

I. To test the given population mean when the sample is


small and the population S.D is not known.
II. To test the equality of two sample means when the
samples are small and population S.D is unknown.
III. To test the difference in value of two dependent samples.
IV. To test the significance of correlation coefficients.

ASSUMPTIONS IN T-TEST

I. The parent population from which the sample are drawn is


normal.
II. The sample observation are independent.
III. The population S.D ‘σ ' is unknown.
IV. When the equality of two population means is tested , the
samples are assumed to be independent and the
population varience are assumed to be equal and
unknown

REPORT TITLE PAGE 6


PROBLEMS
. Example 1: A teacher claims that the mean score of students in his class is greater than 82 with a
standard deviation of 20. If a sample of 81 students was selected with a mean score of 90 then check
if there is enough evidence to support this claim at a 0.05 significance level.

Solution: As the sample size is 81 and population standard deviation is known, this is an example
of a right-tailed one-sample z test.

H σ : μ=82�=82
H1 : μ>82�>82
From the z table the critical value at α = 1.645
z = ¯¯¯x−μ %σ√n
¯¯¯x¯ = 90, μ = 82, n = 81, σ = 20

z = 3.6

As 3.6 > 1.645 thus, the null hypothesis is rejected and it is concluded that there is enough evidence
to support the teacher's claim.

Answer: Reject the null hypothesis

 Example 2: An online medicine shop claims that the mean delivery time for medicines is less than
120 minutes with a standard deviation of 30 minutes. Is there enough evidence to support this claim
at a 0.05 significance level if 49 orders were examined with a mean of 100 minutes?

Solution: As the sample size is 49 and population standard deviation is known, this is an example
of a left-tailed one-sample z test.

H0 : μ=120
H1: μ<120
From the z table the critical value at α� = -1.645. A negative sign is used as this is a left tailed test.
z = ¯¯¯x−μ% σ√n
¯¯¯x¯ = 100, μ = 120, n = 49, σ = 30

z = -4.66

REPORT TITLE PAGE 7


As -4.66 < -1.645 thus, the null hypothesis is rejected and it is concluded that there is enough
evidence to support the medicine shop's claim.
Answer: Reject the null hypothesis

EXAMPLE 3: Find the t-test value for the following given two sets of values:
7, 2, 9, 8 and

1, 2, 3, 4?

Solution: For first data set:

Number of terms in first set i.e. n_1 = 4

Calculate mean value for first data set using formula:

x¯1=∑x1n1
i.e. x¯1=7+2+9+84
i.e. x¯1=6.5
Construct the following table for standard deviation:

x1 x1−x¯1 (x1−x¯1)2

7 0.5 0.25

2 -4.5 20.25

9 2.5 6.25

8 1.5 2.25

Thus , ∑((x1−x¯1)2)=29
Now, compute the standard deviation usng formula as,

REPORT TITLE PAGE 8


s1=(√∑(x1−x¯1)2n1−1)
i.e. s1=(√294−1)
i.e. s1=(√9.66)
s1=3.11
Therefore, standard deviation for the first set of data: s_1 = 3.11

For second data set:

Number of terms in second set i.e. n2=4


Calculate mean value for second data set using formula:

x¯2=∑x2n2
i.e. x¯2=1+2+3+44
i.e. x¯2=2.5
Construct the following table for standard deviation:

x2 x2−x¯2 (x2−x¯2)2

1 -1.5 2.25

2 -0.5 0.25

3 0.5 0.25

4 1.5 2.25

Thus, ∑((x2−x¯2)2)=5
Now, compute the standard deviation using formula as,

s2=(√∑(x2−x¯2)2n2−1)
i.e. s2=(√54−1)
i.e. s1=(√1.66)

REPORT TITLE PAGE 9


s1=1.29
Therefore, standard deviation for the second set of data: s2=1.29
Now, apply the formula for t-test value:

t=x1¯−x2¯(√s21n1+s22n2)
t=6.5–2.5(√3.1124+1.2924)
=4(√9.36674+1.6674)
t = 2.38

Hence t-test value for the two data sets is = 2.38

Example 4: Is there a significant difference in test scores between 25 students who received in-
person instruction and 25 students who received online instruction? The mean test score for the in-
person group is 80 (SD = 5) and for the online group is 75 (SD = 7).

Solution: This is an independent samples t-test problem as the two groups being compared are
independent of each other. To perform the t-test, we first calculate the t-value using the t test formula:

t=¯X1−¯X2%√ s21n1+s22n2

 where mean1 is the mean test score for the in-person group,
 mean2 is the mean test score for the online group
 s1 and s2 are the standard deviations for the two groups
 and n1 and n2 are the sample sizes.

Substituting the numbers, we get:

t = (80 - 75) / (sqrt ((52/25) + (72/25))) = 2.02

Next, a t-table is used to find the critical t-value for the desired level of significance and degrees of
freedom (df = n1 + n2 - 2).

Let us assume a significance level of 0.05 and df = 48. The critical t-value is 2.01.

Since the calculated t-value of 2.02 is greater than the critical t-value of 2.01, we can conclude that
there is a significant difference between the test scores of students who receive in-person instruction
versus those who receive online instruction.

SUMMARY

REPORT TITLE PAGE 10


The z-test and t-test are different statistical hypothesis tests
that help determine whether there is a difference between
two population means or proportions. The z-statistic is used
to test for the null hypothesis in relation to whether there is a
difference between the populations means or proportions
given the population standard deviation is known, data
belongs to normal distribution, and sample size is larger
enough (greater than 30). T-tests are used when the
population standard deviation is unknown, the data belongs
to normal distribution and the sample size is small
(lesser than 30).

Sampling
distribution
of
test
norma
test

tion.
Z-test

REPORT TITLE PAGE 11


is
applied
when
the
test
statistic
follows
normal
distribut
Z -
test

tion.
Z-test
is
applied
REPORT TITLE PAGE 12
when
the
test
statistic
follows
normal
distributi.
Use

REPORT TITLE PAGE 13

You might also like