Wednesday, April 5, 2017

Assignment 4


Part 1: Z and T Tests


1. The following table shows the z and t values associated with various hypothetical tests, which are either one or two tailed and have varying confidence levels.


Interval Type Confidence Level                  n               a  z or t? z or t value
A Two Tailed 90 45 0.05  Z 1.65
B Two Tailed 95 12 0.025  T 2.201
C One Tailed 95 36 0.05  Z 1.65
D Two Tailed 99 180 0.005  Z 2.58
E One Tailed 80 60 0.2  Z 2.06
F One Tailed 99 23 0.01  T 2.508
G Two Tailed 99 15 0.005  T 2.977

2.  An organization from the Kenyan Department of Agriculture and Live Stock Development has created estimates for the yields of Ground Nuts, Cassava and Beans in a certain district, based on the average yields of the country as a whole. Per hectare, it is expected that 0.57 metric tons of groundnuts, 3.7 metric tons of cassava and 0.29 metric tons of beans can be produced. 

To test whether these estimates are realistic, a survey of 23 farmers was carried out. The results were as follows 


      μ              σ
                  Ground Nuts  0.52         0.3
                  Cassava          3.3           0.75
                  Beans             0.34         0.12

To see whether or not these results were statistically different from the average yields from the three crops mentioned above, hypothesis testing was carried out. 

Ground Nuts

Null Hypothesis: There is no difference between the average yields of ground nuts in the selected area and the average yields for the country as a whole

Alternative Hypothesis: There is a difference between the average yields of ground nuts in the selected area and the average yields for the country as a whole. 

Statistical Test: A T test, or Student's T test was chosen to perform the statistical analysis, due to the fact that this type of test is better suited to samples with a small number of observations, and here our number of observations is below thirty as only 23 farmers were sampled. 

Confidence Level: For all three tests, a confidence level of 95% was chosen. As we are conducting a two tailed test, the alpha level is 0.025. This means the critical value, based on 23 degrees of freedom, will be ±2.069 Thus, for this test and the two that follow, a T test result of less than 2.069 but greater than -2.069 will cause us to fail to reject the null hypothesis, meaning that there is no statistical difference between the average yields for this particular area compared to Kenya as a whole. If the result does fall to either side of the critical values rather than between them, we must reject the null hypothesis. This means that there is a statistical difference between the average yields in this area compared to Kenya as a whole. 

T test result: -0.365.

Conclusion: This result is lower than the critical value of 2.069, but greater than -2.069, meaning it does not fall within either of the two tails. Therefore, we must fail to reject the null hypothesis. The probability of this result occurring is 35.94%

Cassava

Null Hypothesis: There is no difference between the average yields of cassava in the selected area and the average yields for the country as a whole

Alternative Hypothesis: There is a difference between the average yields of cassava in the selected area and the average yields for the country as a whole. 

Statistical Test: T test.

Confidence level: 95%

T test result: -2.564

Conclusion: The result of -2.564 is less than the critical value of -2.069 on the left tail. Therefore, we must reject the null hypothesis. The probability of this result occurring is 0.54%

Beans

Null Hypothesis: There is no difference between the average yields of beans in the selected area and the average yields for the country as a whole

Alternative Hypothesis: There is a difference between the average yields of beans in the selected area and the average yields for the country as a whole. 

Statistical Test: T test.

Confidence Level: 95%

T test result: 1.998

Conclusion: This result is lower than the critical value of 2.069 but greater than -2.069, meaning it does not fall within either of the two tails. Therefore we must fail to reject the null hypothesis. The probability of this result occurring is 2.33%

In light of these results, it is clear than while there is no statistical difference between he average yields of beans and ground nuts in the particular area when compared to the country as a whole, is a statistical difference between the amount of Cassava produced. The T test result falls within the left tail, and is negative, meaning that there is statistically less cassava produced in each yield in this part of the country compared to Kenya as a whole. This means that it may be difficult for farmers in this area to get close to the estimated cassava yield provided by the Department for Agriculture and Live Stock Development. This could be due to changes in soil quality or climactic conditions in theis area that do not favor the growth of cassava, resulting in smaller yields for farmers here.

3. As a researcher suspects the level of pollutants in a particular stream to be higher than the allowable level of 4.2mg/l, 17 samples were taken, and from these a mean pollutant level of 6.4mg/l were found, with a standard deviation of 4.4. Hypothesis testing was carried out to find out if this sample was statistically different from the rest of the stream.

Null Hypothesis: There is no difference between the levels of pollution in the sample and the rest of the stream.

Alternative Hypothesis: There is a difference between the levels of pollution in the sample and the rest of the stream. 

Statistical Test: A T test shall be used, as we have a relatively small sample size of 17 and this test is better suited to small samples than a Z test.

Confidence level: 95%. This is a one tailed test, so the alpha level is therefore 0.05. Based on 16 degrees of freedom, this means that the critical value is 1.746. If the calculated test result is greater than this value, we will reject the null hypothesis. If it does not exceed this value, the we will fail to reject the null hypothesis.

Test results: 2.062

Conclusion: As the test result of 2.062 is greater than the critical value of 1.746, we must reject the null hypothesis. This means that statistically, the samples taken from the stream are more polluted than the allowable level of 4.2mg/l. 

The probability of this value is 1.97%

Part 2

For this part of the assignment, we are looking to find out whether or not there is a statistical difference between the home values in Eau Claire City block groups, compared to all of the block groups in Eau Claire County.

To do this, hypothesis testing was carried out, as follows:

Null Hypothesis: There is no difference between the average house values of homes in Eau Claire City block groups compared to the block groups of Eau Claire Country as a whole.

Alternative Hypothesis: There is a difference between the average house values of homes in Eau Claire City block groups compared to the block groups of Eau Claire Country as a whole.

Statistical Test: A Z test was chosen as the appropriate statistic, This is due to the fact that we have a sample size of 53, as there are 53 block groups in Eau Claire city. This shall be a one tailed test. 

Confidence Level: 95%. As this is a one tailed test, the alpha level is thus 0.05. From this, we can figure out a critical value of 1.65. If out test statistic exceeds this, we must reject the null hypothesis.

Test result: 2.572.

Conclusion: As the test result of 2.572 is greater than the critical value on 1.65 associated with our one tailed test, we must reject the null hypothesis. This means that the value of houses located within the block groups that make up the City of Eau Claire is statistically different from the value of houses in the rest of the county.


Figure 1 - Map showing the block groups of Eau Claire by average house value, with City of Eau Claire block groups in bold.

From figure 1, it is clear that many of the block groups within the City of Eau Claire have a lower average property value, particularly as the block groups get smaller in the central business district area. This could be because properties here tend to be smaller, and those in urban areas are likely to have less green space and could lack other amenities such as parking availability if they are apartments. Furthermore, the area is also the location of both the University of Eau Claire and Chippewa Valley Technical College. This means that many of the properties are student rentals, and are not as well maintained as other homes. This would drive down the value of the property compared to those properties not intended to be student rentals. Lastly, this area is also in the vicinity of the Chippewa River, which runs through the city's downtown area. Properties that fall within the potential flood plain of the Chippewa River will also be likely to have lower values due to the potential for future floods and preexisting flood damage. 










No comments:

Post a Comment