Table of Contents

**Introduction** **Hypothesis Testing using Z-test**

The current situation in pandemic due to coronavirus, all of the record has made a statistician. Now, the government and non-government sector constantly checking the numbers, making our own assumptions as per numbers. How the pandemic will play out, it calculates from the hypothesis. All fo these questions and assumptions can be solved by hypothesis testing. In this article, we are cover concepts of hypothesis testing and z-test.

**Hypothesis Testing**

Hypothesis testing is mathematical modeling for a testing claim or hypothesis about the parameters of interest in a given population set, using data measure form sample test.

For Example:

A college student reports score an average of 7 out of 10 in the final semester. To test this “hypothesis”, record marks of say 30 students(sample) from the entire student(i.e. Students as a population now) of the college(i.e. say 300) and calculate that mean of the sample. After that compare the sample mean to the population mean and attempt to confirm the hypothesis.

The basic concepts of Hypothesis testing:

- Null Hypothesis
- Alternative Hypothesis

**Null Hypothesis**

The null hypothesis is always the accepted fact. The meaning of “null” can be thought of as “no change”.

Examples of null hypotheses that are generally accepted as being true (i.e. Null Hypothesis):

- A human has 2 legs and 2 hands.
- DNA is shaped like a double helix.
- The total number of card in a single deck is 52.
- There are 8 planets in the solar system (excluding Pluto).

**Alternative Hypothesis**

The alternate hypothesis is just an alternative to the null(opposite to null). Also called a reject null hypothesis.

For example: “There was no change water level in the Tank,” and the alternative hypothesis would be “There was the change water level in the Tank”

**Z-test:**

A Z-test is a type of hypothesis test. Hypothesis testing is just a figure out if results from a test are validated or repeatable.

For example, if someone said they had found a new drug that cures coronavirus, you would want to be sure it was probably true. A hypothesis test will tell you if it is probably true or false. A Z test, is used when your data is approximately

**z-test:**

Different types of statistical test, you would use a Z test if:

- Data points should be independent
- The sample size is greater than 30.
- Data should be normally distributed.
- Data should be normally selected from a population, where each item has an equal chance.

**One Sample Z-test**

We perform the One-Sample Z test when compare a sample mean with the population means.

**For Example:** Let’s say we need to determine if boys on average score higher than 600 in the exam. We have the information that the standard deviation for boy’s scores is 100. So, we collect the data of 20 boys by using random samples and record their marks. Finally, we also set our ⍺ value (significance level) to be 0.05.

Calculate some statistical:

Mean Score for Girls is 641

The size of the sample is 20

The population mean is 600

Standard Deviation for Population is 100

Using the z-test formula:

Z-score = 1.8336

Critical value = 1.645

z-score>critical value.

H0:μ<=600

H1:μ>600

we can reject the null hypothesis and conclude based on our result that boys on average scored higher than 600.

**Two Sample Z-test**

We perform a Two-Sample Z test when we want to compare the mean of two samples.

For Example:

Here, let’s say we want to know if Boys on the average score of 10 marks more than the girls. We have the information that the standard deviation for boys Score is 100 and for girls, the score is 90. Then we collect the data of 20 girls and 20 boys by using random samples and record their marks. Finally, we also set our ⍺ value (significance level) to be 0.05.

Here, calculate some statistical terms,

- Mean Score for Girls (Sample Mean) is 641
- Mean Score for Boys (Sample Mean) is 613.3
- Standard Deviation for the Population of Girls’ is 100
- The standard deviation for the Population of Boys’ is 90
- Sample Size is 20 for both Girls and Boys
- Difference between Mean of Population is 10

Z-score = 0.588

Critical value = 1.645

Z-score = 1.8336

Critical value = 1.645

z-score>critical value.

H0:μ<=600

H1:μ>600

we fail to reject the Null Hypothesis

**Conclusion**

You learn about when to use the z-test and how to calculate. Also, learn what is means by z-test and uses of z-test.Clear the all basic concept of hypothesis testing.