Part 1
Introduction: The goal of this lab is to become familiar with hypothesis testing. Hypothesis testing is a way to test whether or not certain data is statistically significant to its corresponding average. So for example, lets say someone wanted to see if people in one neighborhood on average went to the grocery store way more often than other neighborhoods. What they would do then is devise a hypothesis test to see not just if people in one neighborhood shop at the grocery store more often, but if they do it so much more often that it is statistically significant.
In order to develop a hypothesis, one must be familiar with the specific model. The hypothesis test model follows this format:
1.) State the Null Hypothesis
--i.e. There is no significant difference between the sample mean and the observed mean
2.) State the Alternative Hypothesis
--i.e. There is a significant difference between the sample mean and the observed mean
--i.e. There is a significant difference between the sample mean and the observed mean
3.) Choose a statistical test
--Either Z-Test or T-Test
4.) Chose level of significance
--Usually between 90%-99%
5.) Test Hypothesis
--Calculate the Z-Test or T-Test
6.) Make decision about null and alternative hypothesis
--Either one "rejects" or "fails to reject" the null hypothesis (meaning the sample either "is" or "is not" statistically significant from the observed mean)
To determine if the data is statistically significant, one would use either a Z-test or a T-test. A Z-Test is generally used for data where n > 30 (or the number of samples taken is greater than 30), and it is an equation Figure 1 to help compare the sample average with the observed average. The x-bar is the sample average, the mu is the observed average, the s is the standard deviation of the sample average, and n is the number of samples taken.
| Figure 1: Z-Test equation taken from study.com. |
A T-Test is similar, however one would only use that test if n <30 (or the number of samples taken is less than 30). The T-test equation is the same as Figure 1. The main difference between the z test and the t test lies in the chart to use, where the z-chart is based on probabilities and the t-chart is based on degrees of freedoms.
After determining a test statistic to use, one determines the significance level, whether its a one-tail versus two-tailed kind of test (which is usually gathered through a literature review of whatever research is desired, however for purposes of this assignment the significance levels are given). After determining the significance level, one finds the corresponding probability on either the Z-chart or the T-chart (so for example: if someone's significance level is at 95%, one would go to the corresponding chart to find the Z-value that is closest to .95).
After determining a significance level, one uses either a z or t test to see if the sample is so out of the ordinary compared to the observed mean, that it's statistically significant. Usually, if the z or t value is greater (or less, depending on the significance level) than the corresponding significance level's z or t value, then one can determine that their sample mean is significantly different than the observed mean.
Assignment Questions:
1.) For this question, we had to fill out the significance levels, whether or not a T-Test or a Z-Test should be used, and the corresponding z or t value (located in Figure 2).
![]() |
| Figure 2: A chart of testing examples |
2.) For this question, we were posed a question, and had to see whether or not the respective crop output was significantly different statistically from their means.
A
Department of Agriculture and Live Stock Development organization in Kenya
estimate that yields in a certain district should approach the following
amounts in metric tons (averages based on data from the whole country) per
hectare: groundnuts. 0.55; cassava, 3.8; and beans, 0.28. A survey of 23 farmers had the following
results
μ σ
Ground
Nuts 0.51 0.3
Cassava 3.4 .74
Beans 0.33 0.13
Ground Nuts Hypothesis Test:
1.) There is no significant difference between the sample average yield and the observed average yield.
2.) There is a significant difference between the sample average yield and the observed average yield.
3.) A T-Test will be utilized because the number of samples is less than 30.
4.) The significance level is .05 and it will be a two-tailed test. The corresponding t-values are 2.074 and -2.074.
5.) Calculate T-Test (sample mean = .51, observed mean is .55, standard deviation is .3, n is 23)
((.51-.55)/(.3/ (square root of 23) ) = -.694
6.) We fail to reject the null hypothesis, because -.694 is within the range of -2.074 to 2.074.
Cassava Hypothesis Test:
1.) There is no significant difference between the sample average yield and the observed average yield.
2.) There is a significant difference between the sample average yield and the observed average yield.
3.) A T-Test will be utilized because the number of samples is less than 30.
4.) The significance level is .05 and it will be a two-tailed test. The corresponding t-values are 2.074 and -2.074.
5.) Calculate T-Test (sample mean = 3.4, observed mean is 3.8, standard deviation is .74, n is 23).
((3.4-3.8) / (.74 / square root of 23)) = -2.592
6.) We reject the null hypothesis, because -2.592 falls outside of the range -2.074 to 2.074
Beans Hypothesis Test:
1.) There is no significant difference between the sample average yield and the observed average yield.
6.) We reject the null hypothesis, because -2.592 falls outside of the range -2.074 to 2.074
Beans Hypothesis Test:
1.) There is no significant difference between the sample average yield and the observed average yield.
2.) There is a significant difference between the sample average yield and the observed average yield.
3.) A T-Test will be utilized because the number of samples is less than 30.
4.) The significance level is .05 and it will be a two-tailed test. The corresponding t-values are 2.074 and -2.074.
5.) Calculate T-Test (sample mean = .33, observed mean = .28, standard deviation = .13, n = 23)
((.33-.28) / (.13 / square root of 23) ) = 1.844
6.) We fail to reject the null hypothesis because 1.844 falls within the range of -2.074 to 2.074.
5.) Calculate T-Test (sample mean = .33, observed mean = .28, standard deviation = .13, n = 23)
((.33-.28) / (.13 / square root of 23) ) = 1.844
6.) We fail to reject the null hypothesis because 1.844 falls within the range of -2.074 to 2.074.
The probability values for each crop are:
Ground Nuts: .246
Ground Nuts: .246
Cassava: .00856
Beans: Between .95652 and .96403
In comparing the results, the beans and the ground nuts both failed to reject the null hypothesis. Both fell within the range of -2.074 to 2.074, which means their data is not statistically significant. The cassava output however rejected the null hypothesis. The t-score of -2.592 fell outside of the range of -2.074 to 2.074, which means their data is statistically significant. In examining the probabilities, both cassava and ground nuts produced a probability between the t tests probability (because it is a two tailed t test at a 95% confidence interval, the t-test probability should be between .025 and .975 in order to fail to reject the null), which means they failed to reject the null. However, the cassava fell outside of the probability, falling at .00856 which is less than .025, which means the null is rejected for cassava.
3.) For this problem, the scenario was posed:
A researcher suspects that the level of a particular stream’s pollutant is higher than the allowable limit of 4.4 mg/l. A sample of n= 17 reveals a mean pollutant level of 6.8 mg/l, with a standard deviation of 4.2. What are your conclusions? (one tailed test, 95% Significance Level). What is the corresponding probability value of your calculated answer?
Beans: Between .95652 and .96403
In comparing the results, the beans and the ground nuts both failed to reject the null hypothesis. Both fell within the range of -2.074 to 2.074, which means their data is not statistically significant. The cassava output however rejected the null hypothesis. The t-score of -2.592 fell outside of the range of -2.074 to 2.074, which means their data is statistically significant. In examining the probabilities, both cassava and ground nuts produced a probability between the t tests probability (because it is a two tailed t test at a 95% confidence interval, the t-test probability should be between .025 and .975 in order to fail to reject the null), which means they failed to reject the null. However, the cassava fell outside of the probability, falling at .00856 which is less than .025, which means the null is rejected for cassava.
3.) For this problem, the scenario was posed:
A researcher suspects that the level of a particular stream’s pollutant is higher than the allowable limit of 4.4 mg/l. A sample of n= 17 reveals a mean pollutant level of 6.8 mg/l, with a standard deviation of 4.2. What are your conclusions? (one tailed test, 95% Significance Level). What is the corresponding probability value of your calculated answer?
To start with a hypothesis test:
1.) There is no significant difference between the sample allowable limit and the observed average allowable limit.
1.) There is no significant difference between the sample allowable limit and the observed average allowable limit.
2.) There is a significant difference between the sample allowable limit and the observed average allowable limit.
3.) A T-Test will be utilized because the number of samples is less than 30.
4.) The significance level is .05 and it will be a one-tailed test. The corresponding T-value is 1.746.
5.) Calculate T-Test (sample mean = 6.8, observed mean = 4.4, standard deviation = 4.2, n = 17)
((6.8-4.4) / (4.2 / square root of 17)) = 2.356
6.) We reject the null hypothesis because 2.356 is greater than 1.746.
The probability is between .96945 and .98554
In conclusion, the t-value for the sample was 2.356, which is greater than the significance level t-value of 1.746, meaning that there is a significant level of pollutant in the stream. The corresponding probability for the significance level is .95, and the probability for the corresponding probability value for my calculated answer was between .96945 and .98554, which also reinforces rejection of the null hypothesis.
4.) The significance level is .05 and it will be a one-tailed test. The corresponding T-value is 1.746.
5.) Calculate T-Test (sample mean = 6.8, observed mean = 4.4, standard deviation = 4.2, n = 17)
((6.8-4.4) / (4.2 / square root of 17)) = 2.356
6.) We reject the null hypothesis because 2.356 is greater than 1.746.
The probability is between .96945 and .98554
In conclusion, the t-value for the sample was 2.356, which is greater than the significance level t-value of 1.746, meaning that there is a significant level of pollutant in the stream. The corresponding probability for the significance level is .95, and the probability for the corresponding probability value for my calculated answer was between .96945 and .98554, which also reinforces rejection of the null hypothesis.
Part 2
Introduction: For this part of the assignment, we were given shapefiles of block groups: one for Eau Claire County, and one for the city of Eau Claire. The shapefiles contained data for the average home prices per block group, and we were posed the question "is the average value of homes per block group in Eau Claire the city significantly different from the block groups in Eau Claire county."
Methods: In order to determine whether or not the average value of homes per block group in Eau Claire City was significantly different from the block groups in Eau Claire County, shapefile data for both Eau Claire City and Eau Claire County were utilized. Using the data, a hypothesis test was utilized. Stemming from the utilization of a hypothesis test, statistics also had to be calculated. Using the statistics function in Arc Map, the average home values per block group for Eau Claire County were obtained, and the average home values per block group for Eau Claire City. Also, the standard deviation and number of block groups for Eau Claire City's home values were obtained for the utilization of either a z or a t test.
Results:
To provide the hypothesis test:
1.) There is no significant difference between the average home price of Eau Claire City's block groups and Eau Claire County's block groups.
2.) There is no significant difference between the average home price of Eau Claire City's block groups and Eau Claire County's block groups.
3.) A Z-Test will be utilized because the number of samples is greater than 30.
4.) The significance level is .05, and it will be a two-tailed test because the statistic could be either significantly lower or higher than the observed average. The corresponding z values are -1.96 and 1.96
5.) Calculate Z-Test (EC City = 151,876.51, EC County = 169,438.13, EC City Standard Deviation = 49,706.92, n = 53)
((151,876.51 - 169,438.13) / ((49,706.94 / (square root 53)) = -2.57
4.) The significance level is .05, and it will be a two-tailed test because the statistic could be either significantly lower or higher than the observed average. The corresponding z values are -1.96 and 1.96
5.) Calculate Z-Test (EC City = 151,876.51, EC County = 169,438.13, EC City Standard Deviation = 49,706.92, n = 53)
((151,876.51 - 169,438.13) / ((49,706.94 / (square root 53)) = -2.57
6.) We reject the null hypothesis, between -2.57 falls outside of the range of -1.96 to 1.96.
By rejecting the null hypothesis, it is concluded that the average value of homes per block group in Eau Claire the city, is significantly different than the average price of homes for the county. -2.57 falls under the the range of -1.96-1.96, which means the average house price per block in Eau Claire City is significantly lower than the average price of homes for the county. And if one looked at the map in Figure 1, the data represents the findings in the hypothesis test. The black outlined block groups represents the block groups within the city of Eau Claire, and a majority of the block groups within the city fall under the lowest two categories of housing price.
By rejecting the null hypothesis, it is concluded that the average value of homes per block group in Eau Claire the city, is significantly different than the average price of homes for the county. -2.57 falls under the the range of -1.96-1.96, which means the average house price per block in Eau Claire City is significantly lower than the average price of homes for the county. And if one looked at the map in Figure 1, the data represents the findings in the hypothesis test. The black outlined block groups represents the block groups within the city of Eau Claire, and a majority of the block groups within the city fall under the lowest two categories of housing price.
![]() |
| Figure 1: Map of Average Housing Price per Block Group in Eau Claire County |
Conclusion: Using both the hypothesis test and the map in Figure 1, it is evident that the average house prices within Eau Claire the city are significantly lower than the ones for the county. The map show a majority of Eau Claire city block groups' average housing prices falling within the two lowest housing categories, and the hypothesis test produced a z-value of -2.57, which falls outside the corresponding z values for a two-tailed z test with a 95% confidence interval.

