Ztest (test of significance of single mean & difference of mean)
Z test for single mean and difference of mean in statistics
Let us consider a sample having size n which is been drawn from the population having population mean μ and standard deviation σ. Here we test whether the specified value of the population mean μ_{0} is equal to the population mean or not. We use the following procedures to test the significance of the single mean
Null hypothesis (H_{0}): μ =μ_{0}
There is no significant difference between the sample mean X̅ and population mean μ. or population mean is equal to some specified mean μ_{0} or sample has been drawn from the given population with mean μ_{0} and standard deviation σ.
Alternative Hypothesis
H_{0}:μ≠μ0 (twotailed test)
There is a significant difference between the sample mean X̅ and population mean μ. or population mean is not equal to some specified mean μ_{0} or sample has not been drawn from the given population with mean μ_{0} and standard deviation σ.
H_{0}:μ>μ_{0} (righttailed test): population means is greater than μ_{0}.
H_{0}:μ>μ_{0} (righttailed test): population means is less than μ_{0}.
Test stat
Test stat for Z test is given by
Where S.E = standard error of the sample mean
σ = standard deviation of the population
μ = mean of the population
X̅ = mean of the sample
n = sample size
when σ is not given we use s if given which is an unbiased estimator of the population standard deviation I.e. (σ̂ =s)
So finally, our test statistics also can be written as the
Level of significance: if not given then we assume a 5% level of significance.
critical value:
The value of Z at the α level of significance can be calculated from the normal table.
Decision: If the tabulated value of Z at the α level of significance is greater than the calculated value I.e. Z_{tab} > Z_{cal }then H_{0} is accepted otherwise rejected. When H_{0} is rejected the alternative Hypothesis H_{1 }is accepted.
Let us consider a two independent random sample having size n_{1} and n_{2} which is been drawn from the population having population mean μ_{1} and μ_{2} and standard deviation σ_{1} and σ_{2}. Here we test whether the specified value of the population mean μ_{1} and μ_{2} are equal or not. We use the following procedure to test the significance of the difference in the population mean.
Null hypothesis H_{0}:μ_{1}=μ_{2} (0ne tailed test)
There is no significant difference between the two sample means or two population mean are equal to each other.
Alternative Hypothesis
(twotailed test)
Two population mean are not equal to each other or there is a significant difference between the mean of two samples.
_{ (}righttailed test): mean of the first population is greater than the second population's means.
_{ }(left tailed test): mean of the first population is less than the mean of the second population.
Test stat
Test stat for Z test is given by
σ_{1}and_{ }σ_{2} = standard deviation of the two population
μ_{1} and μ_{2} = mean of the two population
X̅_{1} and X̅_{2} = mean of the two sample
n_{1 }and n_{2} = size of the two samples.
when σ_{1}and_{ }σ_{2} are not given we use s_{1} and s_{2} if given which are unbiased estimators of the population standard deviation.
So finally, our test statistics also can be written as the
Level of significance and critical value
The value of Z at the α level of significance can be calculated from the normal table. The level of signs indicates the relationship between the sample parameter and population parameter. Which is high or low. If the level of significance is not given then we use the 5% level of significance.
Decision
If the tabulated value of Z at the α level of significance is greater than the calculated value I.e. Z_{tab} > Z_{cal }then H_{0} is accepted otherwise rejected. When H_{0} is rejected the alternative Hypothesis H_{1 }is accepted.
Example1
The mean of a firm maintains that the meantime for a drug to take effect in 24 minutes. In the sample of 400 trials, the meantime is 26 min with a standard deviation of 4 minutes. Test the hypothesis that the mean tie is 24 minutes against an alternative hypothesis that is not equal to 24 minutes. Use a level of significnace of 0.05.
Solution:
here, sample size n>30 so we perform the Z test.
Here, population mean (μ) = 24
Sample mean X =26 minutes.
Sample size (n)=400
sample standard deviation(s )= 4 minutes.
Now:
Null Hypothesis, minutes I.e. population mean is equal to 24 minutes or mean time to take effects is 24 minutes.
Alternative Hypothesis, i.e. population mean is not equal to 24 or average time of effects of medicine is not equal to 24 min.
Test statistics:
Test stat
Level of significance: here we assume a 5% level of significance.
Critical value: the value of Z at 5% level of significance for twotail test can be calculated from the table which is 1.96 I.e Z=1.96
Decision:
Since the stabilized value of Z is less than the calculated value hence we reject the null hypothesis and accept the alternative hypothesis.
Example2
The sample of the two types of electric bulbs was tested for the length of the file and the following result was obtained.

Sample size 
Sample mean 
Sample s.d 
Type I 
50 
1234 
36 
Type II 
50 
1215 
40 
Is the difference in the means sufficient t warrant that type I is superior to type II regarding the length of the life?
Solution:
Given,

Sample size 
Sample mean 
Sample s.d 
Type I 
n_{1}= 50 
X_{1}= 1234 
s_{1}= 36 
Type II 
N_{2}= 50 
X_{2}= 1215 
s_{1}= 40 
Null hypothesis H_{0}:μ_{1}=μ_{2} (0ne tailed test)
Two population mean are equal I.e. mean life of each bulb is equal.
Alternative Hypothesis
H_{1}:μ_{1}>μ_{2} _{ (}righttailed test): mean life type I bulb is greater than the life of type II bulb I.e. type I bulb is superior.
Test stat
Test stat for Z test when sample standard deviation is given can be written as
Level of significance: here we assume a 5% level of significance.
Critical value: the value of Z at 5% level of significance for twotail test can be calculated from the table which is 1.96 I.e Z=1.645
Decision:
Since the tabulated value of Z is less than the calculated value hence we reject the null hypothesis and accept the alternative hypothesis. it Means type I bulbs are superior.
Example3
The mean weight of the sample of 50 packets of product is 14.6 kg. test whether the sample is from a batch of packets having the mean weight of 15.6 kg and a standard deviation of 2.2 kg. (2018 June make up MBS)
Solution:
here, sample size n>30 so we perform the Z test.
Here, population mean (μ) = 15.6
Sample mean (x̅ )=14.6
Sample size (n)=50
Population standard deviation(σ )= 2.2 kg
Now:
Null Hypothesis, H_{0}:μ =15.6 kg I.e. population mean is equal to 15.6 kg
Alternative Hypothesis, H_{1}: ≠ 15.6 kg I.e. population mean is not equal to 15.6 kg.
Test statitics:
Level of significance: here we assume a 5% level of significance.
Critical value: the value of Z at 5% level of significance for twotail test can be calculated from the table which is 1.96 I.e Z=1.96
Decision:
Since the tabulated value of Z is less than the calculated value hence we reject the null hypothesis and accept the alternative hypothesis.
Example4
The average height of a sample of 6400 people from locality A is 67.85 inches and a standard deviation of 2.56 inches, while the average height of the sample of 1600 people from the locality is 68.55 inches, and the standard deviation 2.52 inches. Do the data indicate that people from locality B are on average taller than people from locality A?
Solution:
We have given,

Locality A 
Locality B 
Sample size 
n_{1}=6400 
_{n}_{2}=1600 
Sample mean 
X_{1 }=67.85 
X_{2} =65.55 
Sample s.d. 
s_{1} =2.56 
s_{2} =2.52 
Null hypothesis H0:μ_{1}=μ_{2} (0ne tailed test)
Two population mean are equal I.e. mean height of each people from two localities is equal.
Alternative Hypothesis
(left tailed test): mean height of people from locality A is less than the mean height of people from locality B.
Test stat
Test stat for Z test when sample standard deviation is given can be written as
Z=9.9
Z=9.9
Level of significance: here we assume a 5% level of significance.
Critical value: the value of Z at 5% level of significance for twotail test can be calculated from the table which is 1.96 I.e Z=1.645
Decision:
Since the tabulated value of Z is less than the calculated value hence we reject the null hypothesis and accept the alternative hypothesis. mean height of people from locality A is less than the mean height of people from locality B.
Example 5
The manufacturer of the electronic equipment based in Patan city claims that only 4% of its products are defective. to test the claim of the manufacturer a random sample of 350 products is taken and found to have 15 defectives. Do you agree with the view of the manufacturer?
Given
Population proportion of defective items(P) = 4% =0.04
Numbers of defective items (X)=15
sample proportion of defective items
sample proportion of nondefective items q=1p=0.957
Null Hypothesis, H_{0}:p=0.04 I.e. 4% of items are defective .
Alternative Hypothesis, H_{0}:μ>24 i.e. more than 4% of items are defective.
Test statistics:
Test stat
Z=0.29
Z=0.29
Level of significance: here we assume 5% level of significance.
Critical value: the value of Z at a 5% level of significance for onetail test can be calculated from the table which is 1.645 I.e Z= 1.645
Decision:
Since the tabulated value of Z is greater than the calculated value hence we accept the null hypothesis and reject the alternative hypothesis.
 VIA
 Edubomb
 SOURCS
 Edubomb
LEAVE A COMMENT
Facebook Conversations