Hypothesis Testing
Introduction:The objective of this lab is to be able to correctly distinguish if you need to use a z-test or a t-test, and to be able to calculate the answer to a z or t test. Then be able to apply the steps of hypothesis testing to come to a conclusion with the null and alternative hypotheses. The last objective is to be able to apply the data found to the real world and geography.
Terms:
Z-test: Tests whether two population means are different usually used fro large samples over 30
![]() |
| Figure 1: Z-Test Equation |
![]() |
| Figure 2: T-Test Equation |
Two Tailed: Is used when you are unsure of the direction of your study question
Type 1 Error: occurs when a true null hypothesis is rejected
Significance Level: Set to determine the probability level of a null hypothesis being rejected
Null Hypothesis: States there is no difference between your sample mean and the hypothesized mean or it is equal to zero
Alternative Hypothesis: States that there is a difference between the sample mean and hypothesized mean
Hypothesis Testing: The way that inferences about a population are made from a sample
- State the null hypothesis
- State the alternative hypothesis
- Choose a statistical test
- Choose α or the level of significance
- Calculate test statistic
- Make a decision about the null and alternative hypotheses
PART I
1)
For Two Tailed z or t values the answer is either + or - because of there being two separate values
2)
Testing the null and alternative hypothesis for estimated yields per hectare in certain areas in Kenya from the Department of Agriculture and Live Stock Development organization.-First I found the T-Value shown in Figure 3 which is needed to be able to reject or fail to reject the hull hypothesis. Then I Figured out the T-Test values for Groundnuts, Cassava, and Beans. I did this by using the equation for T-Test in Figure 2. I then used the hypothesis testing to determine if there was or was not a difference between the sample mean and mean population.
![]() |
| Figure 3: T-Value for Question 2 |
n= 23
μ σ μh
Ground
Nuts 0.51 0.3 .55
Cassava 3.4 .74 3.8
Beans 0.33 0.13 .28
T- Value= + or -2.074
Groundnuts:
1. State the null hypothesis
- There is no significant difference between the sample mean and the mean for Groundnuts
2. State the alternative hypothesis
- There is a significant difference between the sample mean and the mean for Groundnuts
3. Choose a statistical test
- Use a T-Test because the value of n is less than 30
4. Choose α or the level of significance
- α= + or -.025, 2-tailed test
5. Calculate test statistic
- T-test= -.64
6. Fail to reject the null hypothesis
Cassava:
1. State the null hypothesis- There is no significant difference between the sample mean and the mean for Cassava
2. State the alternative hypothesis
- There is a significant difference between the sample mean and the mean for Cassava
3. Choose a statistical test
- Use a T-Test because the value of n is less than 30
4. Choose α or the level of significance
- α= + or - .025, 2- tailed test
5. Calculate test statistic
- T-test = -2.597
6. Reject the null hypothesis
Beans:
1. State the null hypothesis-There is no significant difference between the sample mean and the mean for Beans
2. State the alternative hypothesis
- There is a significant difference between the sample mean and the mean for Beans
3. Choose a statistical test
- Use a T-Test because the value of n is less than 30
4. Choose α or the level of significance
- α= + or - .025, 2-tailed test
5. Calculate test statistic
- T-test= 1.85
6. Fail to reject the null hypotheses
Similarities and Differences: The Groundnuts and Beans both failed to reject the null hypotheses while the Cassava rejected it. The Cassava had a greater standard deviation which backs up that it rejected because there is most likely more outliers that are pulling it from the mean. The Groundnuts and Beans both on the contrary have smaller standard deviations.
3)
Testing a suspicion a researcher had about the level of a particular stream's pollution being higher than the allowable limit which is 4.4 mg/l.
To figure this out I first again like I did in question two figured out the T-Value which is shown in Figure 4. Then I found out the T-Test stat using Figure 2. From there by using the Hypothesis testing I decided whether the suspicion the researcher had about the particular streams pollution being higher was correct.
![]() |
| Figure 4: T-Value for Question 3 |
Standard Deviation=4.2
u=6.8
uh=4.4
n=17
T-Value= 1.746
1. State the null hypothesis
-There is no significant difference between the sample mean and the mean of the stream pollution
2. State the alternative hypothesis
- There is a significant difference between the sample mean and the mean for the stream pollution
3. Choose a statistical test
- Use a T=Test because the value of n is less than 30
4. Choose α or the level of significance
- α= + or -.05, 1-tailed test
5. Calculate test statistic
-T-Test= 2.35
6. Reject the Null Hypothesis
Part II:
Question: Is the average value of homes for the City of Eau Claire block groups significantly different from the block groups for Eau Claire County?
To answer this question I used the two shape files given and got the statistics needed from both shown in Figures 5 and 6. I got the statistics needed from Eau Claire City which was the standard deviation, mean and sample size. Then I got the only thing needed which was the population mean. I then concluded because the sample size for the sample mean was over 30 to use the Z-Test. From there I found the Z-Value shown in Figure 7. By doing that I had to decide that the Confidence level was 95 and that it was a 2-Tail test because the direction was unsure. I then calculated the Z-Score by using the equation shown in Figure 1 and by the statistics I found from the county and city. Finally I used hypothesis testing to figure out if there was a significant difference from the block groups for Eau Claire County and the City of Eau Claire.
To answer this question I used the two shape files given and got the statistics needed from both shown in Figures 5 and 6. I got the statistics needed from Eau Claire City which was the standard deviation, mean and sample size. Then I got the only thing needed which was the population mean. I then concluded because the sample size for the sample mean was over 30 to use the Z-Test. From there I found the Z-Value shown in Figure 7. By doing that I had to decide that the Confidence level was 95 and that it was a 2-Tail test because the direction was unsure. I then calculated the Z-Score by using the equation shown in Figure 1 and by the statistics I found from the county and city. Finally I used hypothesis testing to figure out if there was a significant difference from the block groups for Eau Claire County and the City of Eau Claire.
![]() |
| Figure 5: Statistics of Eau Claire County |
![]() |
| Figure 6: Statistics of the City of Eau Claire |
![]() |
| Figure 7: Z-Test for Part II |
1. State the null hypothesis
- There is no significant difference between the sample mean and the mean of the average cost of housing
2. State the alternative hypothesis
- There is a significant difference between the sample mean and the mean for the average cost of housing
3. Choose a statistical test
- Use a Z-Test because the value of n is greater than 30
4. Choose α or the level of significance
- α= + or - .05, 2-tailed test
5. Calculate the test statistic
- Z-Test= -2.57
6. Reject the Null Hypothesis Z-Value=1.64
Conclusion:
By saying that I rejected the null hypothesis that means that there is a significant difference between the average housing cost for the county and city of Eau Claire. This is shown in the map because there is a distinct pattern in the City of Eau Claire being cheaper housing (shown by the green and yellow colors) than the surrounding county. There isn't even any dark or light green shown on the map outside of the city and very little yellow. This would make sense because the Z-test calculation that I got was -2.57 meaning it falls on the left tail side of the Z-Value of -1.64. This would make sense to me because from what I know about the city of Eau Claire the dark green is student housing area, and also the farther out of the city you get the more expensive housing is because of increase in acreage.









No comments:
Post a Comment