logo

ANALYSIS OF MILK YIELD IN CATTLE AND VEGETATION DISTRIBUTION

   

Added on  2022-08-22

24 Pages5077 Words12 Views
ANALYSIS OF MILK YIELD IN CATTLE AND VEGETATION DISTRIBUTION
STUDENT NAME:
SCHOOL:
AFFILIATION:
1

ANALYSIS OF MILK YIELD IN CATTLE AND VEGETATION DISTRIBUTION
Contents
Question 1: Association between Metritus and Mastitis..........................................................3
Question 2: Difference between Parity and Breed.................................................................3
Question 3: Previous vs. Actual......................................................................................... 5
Question 4: Normality test................................................................................................ 7
Question 5: Milk Yield.................................................................................................... 8
Question 6: Butterfat and Milk Yield................................................................................. 9
Question 7: Ordination.................................................................................................. 12
References.................................................................................................................. 15
Appendix.................................................................................................................... 16
2

ANALYSIS OF MILK YIELD IN CATTLE AND VEGETATION DISTRIBUTION
Question 1: Association between Metritus and Mastitis
Mastitis and Metritus were categorical variables. To assess the association between them, a chi-
square test was appropriate using the R chisq.test ( ) function. Below is a summary table of both
variables showing observed, expected and residual values.
A null hypothesis stated that there was no association between the two variables. The alternative
was vice versa. The results from the chi-square test in R were as shown below.
Pearson's Chi-squared test with Yates' continuity correction
Data: pt$Mastitis and pt$Metritus
X-squared 0.50283
Df 1
p-value 0.4783
With a p-value greater than the significance level of 0.05, the decision was to accept the null
hypothesis and conclude that there was no association between Metritus and Mastitis. See the
correlation plot of residuals below. It displayed the correlation matrix with colors intensity
proportional to the variables’ correlational coefficients. See the figures above on residuals of the
chi-square test. The blue color stood for the 0.502 and 0.574 while the maroon one was for |
0.537|. The lighter the color, the higher the residual value was.
3
Metritus
N Y Observed Expected Residuals
Mastitis N 10 6 8.533333 7.466667 0.502 -0.537
Y 6 8 7.466667 6.533333 -0.537 0.574

ANALYSIS OF MILK YIELD IN CATTLE AND VEGETATION DISTRIBUTION
Correlation plot of residuals
Question 2: Difference between Parity and Breed
a. Independent variable: Breed
Dependent variables: Parity
The levels of the independent variable:
Friesian
Ayrshire
Shorthorn.
b. A Kruskal-Wallis test was suitable to test for the difference in parity and breeds of
cows. The reason was that the dependent variable Parity was ordinal / continuous while
the independent variable Breed was nominal /categorical. Since there were 3 categories,
the non-parametric test compared their medians to determine if they had come from
different populations. See the summary table of Breed and Parity variables.
Breed Count mean sd median IQR
1.Ayrshire 10 3.6 1.26 3.5 1
2. Friesian 10 4.4 1.26 4.5 1
3. Shorthorn 10 3.1 0.738 3 0.75
4

ANALYSIS OF MILK YIELD IN CATTLE AND VEGETATION DISTRIBUTION
c. Report:
The K-W test is equivalent to One-Way ANOVA but it is non-parametric. The test
assumes that there are independent observations and significant differences among the
independent groups. To ascertain this, check the data. If the assumption is not met, a
Friedman’s test is used.
Case Study:
The objective of the test was to determine if there was any significant difference between
the average number of times calved by cows in the 3 experimental conditions (Breeds).
Before running the test, a hypothesis was formulated as follows:
H0: There were no independent observations and significant differences among the
independent groups.
H1: There were independent observations and significant differences among the
independent groups
The level of significance used was 0.05. Here, the decision was to reject the null
hypothesis if the test’s p-value exceeded 0.05. Using the function kruskal.test (), the test
was performed in R and the output obtained was:
Kruskal-Wallis rank sum test
Data: Parity by Breed
Kruskal-Wallis chi-squared 5.868
Df 2
p-value 0.05318
As the p-value was greater than the significance level 0.05, the null hypothesis was
accepted. There were no significant differences among Breeds. Below was a GGboxplot
of Parity against Breed. The three types of breeds differed in parity with Friesian having
the highest number of calves (Parity). Consequently, even mean, median, minimum.
Maximum and IQR values were the highest than those of Ayrshire and Shorthorn.
Shorthorn had the lowest values of Parity thus featuring as the lowest in Parity. In
addition, its median was almost the same as its minimum. Both Ayrshire and Friesian had
5

ANALYSIS OF MILK YIELD IN CATTLE AND VEGETATION DISTRIBUTION
outliers detected by the boxplots. The blue and yellow dots in the plot represented the
outliers.
Question 3: Previous vs. Actual
The Yield_prev and Yield_act data (kg/day) represent yield before treatment and after.
a. Test:
A paired t-test would be used to check for paired differences because sample sizes are
related, numerical and small (do not exceed 30). The parametric test is also used to check
for normality.
b. Report:
The paired samples t-test is used to compare the means between two related groups of
samples. In this case, there are two values (i.e., pair of values) for the same samples.
Below is a brief report that describes how to compute paired samples t-test using R
software:
Case Study:
As the data’s background description stated, the aim was to analyze milk production
performance in 30 dairy cows. Using a paired t-test, the following was possible to
calculate:
The difference (dd) between each pair of values.
The mean (mm) and the standard deviation (ss) of dd.
The average difference to 0. If there is any significant difference between the two
pairs of samples, then the mean of d (mm) is expected to be far from 0.
From the above, a hypothesis was stated:
6

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Econometrics Question and Answer 2022
|7
|1035
|30

Find the best predicted systolic blood pressure in the left arm given that the systolic blood pressure in the right arm is 100 mm Hg (using Regression line)
|4
|970
|46