• +1-617-874-1011 (US)
  • +44-117-230-1145 (UK)
Live Chat
Follow Us:

Statistics for Life and Social Science

Computing assignment

"BW" "HTL" "SEX"
50.58 0.88 1
52.45 1.38 1
45.21 1.1 1
63.9 1.83 1
58.22 1.38 1
51.05 1.03 1
60.88 1.57 0
54.46 1.23 0
58.31 0.99 0
49.7 1.23 0
54.27 1.27 1
54.09 1.37 0
48.27 1.58 1
58.57 1.63 1
57.23 0.58 0
58.86 0.98 1
60.17 1.55 1
50.24 2.93 1
50.91 0.95 0
50.37 1.09 0
48.31 1.07 1
61.16 1.83 0
44.52 1.54 1
47.58 1.24 0
59.15 0.91 1
60.12 1.71 1
54.72 1.54 0

Format

Here are some more details that may assist you:

• Regarding the overall assignment structure, this is up to you, just remember to keep it clear and concise. If you are answering questions in the given order (that is, 1a), b), etc.), then this is fine. You don’t need to re-write the assignment question again.

• You are required to type up your entire assignment (rather than scanning and taking screenshots). If you are using Word you should use the equation editor for any maths notation. If you don’t have Word then please use the School computers. Please convert and submit your assignment in pdf.

• You are asked to produce SIX graphs/plots for this assignment. You are required to produce these in RStudio. You may want to use the par(mfrow=c(2,3)) function to construct all six graphs per plot (this is optional), see Section R1.4 “Transforming data using RStudio”of the RStudio “How-To-Manual” available on Moodle.

• We recommend adding some working out for some of the questions involving calculations. But try to keep your solutions brief and concise (since there is a page limit). It’s good practice for the exam and in case you get the wrong answer you have some workings to gain marks from. Your working could consist of RStudio commands or perhaps the main steps on how you arrived at your answer. You don’t need to add all of your R-code! • Keeping your results to 2 or 3 decimal places should be fine.

• There is no requirement for font size and line spacing but obviously don’t make things too small.

Scenario

A team of researchers were interested in studying the impacts of drought on sheep livestock in farms around New South Wales and Queensland, Australia. In particular, the researchers wanted to compare the average body weight of sheep from five years ago (when there was little drought) to now (Spring, 2018) where drought is of serious concern. To obtain their data, the research team decided to collect a random sample of sheep from a very large sheep population on a farm affected by the drought. This random sample of data consists of sheep body weight measurements (measured in kilograms), head-to-tail length measurements (measured in metres) and their gender (male/female). The text file contains your unique data of length n in separate rows consisting of 3 variables: BW which corresponds to sheep body weights, HTL which corresponds to sheep head-to-tail lengths, and SEX which corresponds to gender (0 = Female and 1 = Male). Your job is to assist the research team by analysing the data set provided to you.

The Analysis Tasks

The questions you need to answer in your assignment submission are given below. Please make sure your assignment is converted to pdf format.

1. (a) Calculate the sample mean and sample standard deviation of your sample of sheep body weight (BW) measurements.

(b) Produce a normal quantile plot of your sample of sheep body weight measurements (see Section R2.6 “How to produce a normal quantile plot using RStudio”). Include this plot in your submitted assignment, properly labelled.

(c) By referring to the normal quantile plot obtained in Part 1b briefly discuss if the sheep body weights are approximately normally distribution.

2. Let µ be the population mean body weight (in kg) of sheep (of any gender) on the farm now (Spring, 2018). The research team decided to compare the current sheep mean body weight with the mean from five years ago. The known mean body weight for sheep from five years ago was 60kg.

(a) Test the hypothesis that µ is equal to 60. You must summarize all steps: state the null (H0) and alternative hypotheses (Ha) relevant to the research objectives stated in this scenario, the value of a suitable test statistic, the sampling distribution for this statistic, a P-value, your summary of significance and conclusion in plain language.

(b) Some assumptions need to be made for the sampling distribution of the test statistic (as given in Part 2a) to be valid. State these assumptions.

(c) Discuss whether the assumptions from Part 2b are satisfied?

(d) Produce a 95% confidence interval for µ, the mean body weight of sheep. For this question you may assume that it is appropriate to use a t-distribution. Make sure you write down all the required steps to calculate this interval. Does this confidence interval include the value 60? Explain whether your confidence interval is consistent with your conclusions from the hypothesis test in Part 2a.

3. The research team were also interested in studying:

• the relationship between body weight and gender; and

• the relationship between body weight and head-to-tail length.

(a) Produce a comparative boxplot for sheep body weight against gender. Include this plot in your submitted assignment, properly labelled.

(b) Describe any differences or similarities in the distribution of body weight of sheep for the different genders using your comparative boxplot from Parts 3a.

(c) Construct an appropriate graphical summary to visualize the relationship between body weight and head-to-tail length. Include this plot in your assignment, properly labelled.

(d) Summarize the key features of your plot from Part 3c.

(e) Suggest an appropriate numerical summary to quantify the linear relationship between body weight and head-to-tail length. Report and comment on this value.

(f) The research team wanted to predict sheep body weight from head-to-tail length measurement by fitting a linear regression model. Would you recommend the research team do this? Explain briefly.

4. The research team decided to investigate the head-to-tail length (HTL) measurement in more detail.

(a) Produce a five number summary for the HTL measurements.

(b) Produce a histogram for the HTL measurements. Include this histogram in your submitted assignment properly labelled.

(c) In MATH1041, we looked at the effect of transforming data. Using the HTL measurements, perform:

(1) a log transformation; and

(2) a square-root transformation, and produce a histogram for each of these. Include these histograms in your submitted assignment properly labelled.

(d) Summarize the key features of each histogram from Parts 4b and 4c (that is, the raw data, and each of the transformations). Please comment on central location, spread, and (any) skewness/symmetry.

(e) Do you think these transformations reduced any skewness? Explain briefly.

Stats Sample Assignments