Everything about Z test
Hypothesis testing comes under inferential statistics. In hypothesis testing, we derive conclusions on population data from sample data.
Everything about Z test
Hypothesis testing comes under inferential statistics. In hypothesis testing, we derive conclusions on population data from sample data.
In Z test and t test, we take mean/average of the sample data and from that we form conclusions about the population data
Both Z-tests and t-tests assume a normal distribution of the data
Whenever we have a categorical data, we use Chi squared test
ANOVA (Analysis of Variance), ->It is used when we are given 2 datasets and we need to comment on their population variance from their sample variances
When to use Z test/ t test

Example
The average height of all residents in a city is 168cm with a population std deviation = 3.9. A doctor believes the mean to be different. He measured the height of 36 individuals and found the average to be 169.5 cm
- Q1. State null and alternate hypothesis
- Q2. At a 95% confidence interval, is there enough evidence to reject the null hypothesis
Answers:
- population mean = 168 cm. population std deviation = 3.9. sample size is 36. sample mean is 169.5 cm
- Null hypothesis : Doctor is wrong which means the population mean is 168 cm only
- Alternate hypothesis : Doctor is right which means the population mean is not 168 cm
- Now this is a 2 tail test because after performing statistical test, my population mean can be greater than 168 cm or less than 168 cm
- Confidence interval is 95% . Significance value is 5% (100–95)
- Now we will need to create decision boundary. For that we need to know the range of the confidence interval. And to get this range, we will refer Z table

- Now to get the value of B we will use Z table and search for this value (Total area under curve which is 1–2.5% = 1–0.025 = 0.9750)

This is the Z table. Note it is not the complete table
The values from above table are taken only if we are finding the maximum value of the decision boundary. In our diagram it is point B
- So point B is 1.96
- Now similarly point A is -1.96 (1.9 + 0.6 = 1.96)

This is the Z table. Note it is not the complete table
The values from above table are taken only if we are finding the minimum value of the decision boundary. In our diagram it is point A
- Now if the value of Z test is between -1.96 to 1.96 we will accept the null hypothesis
- Now applying the Z test formula

The formula to calculate Z test value
- So, here the value of z test is 2.31

Calculation of z test for our example
- Since the value of z test is greater than 1.96 we reject the null hypothesis which means we can now say that the population mean height is not 168 cm
메타데이터
- post_id
- d2bd4c16bf83
- slug
- everything-about-z-test-d2bd4c16bf83
- url
- https://medium.com/@abhishekjainindore24/everything-about-z-test-d2bd4c16bf83
- canonical_url
- https://medium.com/@abhishekjainindore24/everything-about-z-test-d2bd4c16bf83
- author_url
- https://medium.com/@abhishekjainindore24
- status
- ok
- fetched_at
- 2026-07-22 14:50:44