代写STAT*2040 Fall 2024 Data Analysis Assignment #2代做Python编程
- 首页 >> CSSTAT*2040
Fall 2024
Data Analysis Assignment #2
This is a real assignment. With real statistics, and real thinking required. You will need to put sometime in. It’s best to get anearly start.
This assignment has a deadline of Wednesday November 20 at 11:59 pm. Submissions must be made to Gradescope. This assignment involves one sample inference procedures for a mean, two-sample inference procedures for the difference between means, and reading a journal article and interpreting some values given in the article. Part 1 involves confidence intervals and hypothesis tests for a single mean, so you can start that once you’ve had an introduction to confidence intervals and hypothesis tests. Parts 2 and 3 mainly involve inference procedures for two means. Once we are through two-sample inference procedures on means you should have the background required to complete almost everything in this assignment.
You may complete this assignment individually, or in groups of 2 or 3. No groups of 4 or more, under any circumstances. This is to encourage discussion, with the idea of helping you learn the material. It is expected that you work on all of the parts together, and not split it up into parts for each person. I very much view these assignments as a learning tool as much as an assessment tool, and you’re depriving yourself of that if you ignore certain parts. With that in mind, it is entirely up to you whether or not you choose to work in groups or individually, and entirely up to you to make sure your group members are contributing. If someone is not carrying their weight, you are welcome to do the assignment individually. And, once again, it is expected that you work together on all parts.
If you are in the DE course, you can only submit with individuals in the DE course. If you are in the face-to-face offering, you can only submit with individuals in that offering. There is no reasonable way forme to make that crossover happen. You are NOT allowed to simply submit the same assignment to the DE and face-to-face offering under different names; that is academic misconduct. Each group must write up its own submission.
There are 3 parts to this assignment:
1. Data analysis and write-up of interpretations and conclusions for a one-sample problem. (30 marks)
2. Data analysis and write-up of interpretations and conclusions for a two-sample proce- dure. (30 marks)
3. Reading parts of a journal article, and interpreting some values given in the the article. (20 marks)
Part of this assignment involves creating various plots in R (or R Studio), and using R to carry out some calculations. Any plot or output that is done in software other than R (e.g. Excel) will receive a grade of 0. This is an R assignment.
On at least one of the parts, you will need to look up a journal article. The journal articles are freely available from the University of Guelph library website. It’s usually quickest to search for the article title in Omni (on the library site), then follow the Available Online link. You can also search for the journal title through Omni, but the article title often takes you straight there. If you are off-campus, then you will be prompted to use the off-campus sign on before proceeding to the journal article.
This assignment is worth 12% of your final grade. You will be marked on: 1) Getting the proper R output and plots, 2) Validity of your statistical conclusions and interpretations, 3) Writing style. (grammar and clear concise language count!), 4) Presentation. (I don’thave a specific presentation style. in mind, but make it clean and easy to read. Sloppy work won’t earn full marks.) Note that you must use R to complete this assignmen. My “Intro to R” document is available on the Courselink site.
You will have to do some thinking in this assignment. Iam not going to tell you exactly what to do, and I would be negligent in my duties as a professor if I were to do so. You are most welcome to ask me questions, and post questions or comments on the discussion board (but refrain from posting specific answers or code that could simply be copied). If you’re holding up your end of the bargain, and giving these questions an honest go, then I’m very willing to help when you have questions or concerns. I am not always looking for one specific method of analysis – for some of these questions, there is more than one path to perfect marks.
(You can do this assignment in either base R or R Studio.)
1 PartI: Birth weight of Asian elephants born in captivity (25 marks total)
Dale (2010) investigated various characteristics of newborn elephants born in captivity. Here we will look at the birth weight of 49 male Asian elephants from that study. The file 2040_F24_elephant_birthweight.csv contains the birth weight (kg) of these elephants. You must import this data into R to carry out the analysis.
For your write-up to be complete, you must:
a) Plot an appropriate boxplot, histogram, and normal quantile-quantile plot of the birth weights. Include the line in the normal QQ plot. Properly label the axes (the default axis labels on the normal QQ plot is fine). Give each plot an appropriate title or caption. As with Assignment 1, using R put the name of one of your group members on each plot. Include these plots in your submission.
Include the R commands you used to create the boxplot and to put your name on the plot.
b) Comment on the whether the normality assumption of the one-sample t procedures is reasonable in this setting. You should make reference to the appropriate plot(s). If you feel there is a violation of the normality assumption, do you think it is still reasonable to use the t procedure here? Justify your position.
For the remainder of this section, assume it is reasonable to use the t procedures.
c) Suppose we decide to use the t procedures to analyze the data. Use t . test in R to calculate a 95% confidence interval for the population mean. Include the output from R in your submission.
Give an appropriate interpretation of the 95% confidence interval given by R, in the context of the problem.
d) If you feel there is an appropriate hypothesis test to carry out, then state why you think your test is a meaningful test, and carry it out, using R’s t . test to do the calculations. Include the output. Give an appropriate conclusion in the context of the problem at hand. If you do not feel there is a natural hypothesis test to carry out here, then say so and justify your position. (Recall that choice to carry out a hypothesis test and the hypotheses thereof have nothing to do with the data in the current sample, or default output from software, but they should be based on the nature of the problem at hand.)
e) Read the “Methods and Procedures” section of the paper. Comment on the sampling design used in this study, and how that might impact our statistical inference procedures and the conclusions and interpretations we draw from them.
Your submission must include the boxplot, the normal QQ plot, and the R output, in addition to your comments and interpretation. Your submission for this part should only be two pages, but can be three pages if you feel that is necessary.
2 Immune differences in lactating and non-lactating female zebras
(30 marks total)
Seeber et al. (2020) investigated various aspects of immunological responses in zebras. In one aspect of the study, researchers compared variables related to immune response in lactating females to those of non-lactating females. One of the measured variables from blood samples was lysozyme concentration (µg/L). (Lysozyme is abiomarker of the immune response.)
The data is contained in the file 2040_F24_zebras_lysozyme.csv. This data set contains lysozyme concentrations for 17 free-ranging female zebras captured in Tanzania. (Zebras were immobilized with a dart gun and a blood sample was drawn.) Eight of the zebras were lactating (and had a foal), and 9 were non-lactating. We will compare the lysozyme concentrations of lactating and non-lactating zebras.
You will need to use an appropriate t . test command to carry out the calculations. For your write-up to be complete, you must:
a) Plot side-by-side boxplots of the data (in one plot). Label the plot appropriately. Plot normal quantile-quantile plots for the two groups separately. Include the plots in your submission.
Include the R commands you used to create the boxplots and to put your name on the plot.
b) Comment on whether the normality assumption of the two-sample t procedures is reason- able in this setting. You should make reference to the plots. If you feel there is a violation of the normality assumption, do you think it is still reasonable to use the t procedure here? Justify your position.
For the next portion, assume that it is reasonable to use the t procedures on this data.
c) Choose to analyze the data with either the pooled-variance tor Welch’st procedure. Justify your choice.
Give the R output for your choice of procedure.
d) Interpret the results, including commenting on the results of the test of the null hypothesis that the true lysozyme concentration is the same for both groups, and an appropriate interpretation of a relevant confidence interval. Interpretations must relate to the problem at hand.
(Do not use the phrases ‘reject H0 ’ or ‘do not reject H0 ’ at any point in your response. You may speak in terms of statistical significance, or strength of evidence, just not in terms of rejecting the null or not. Nobody is ‘rejecting’ anything here and there is no decision being made – we are assessing evidence.)
e) Write up a very brief summary of the results of the test and confidence interval, as they might appear in a journal article.
f) Describe the results in a casual but meaningful fashion, as if you were discussing this study with your family over a meal.
Your submission must include the boxplots, normal QQ plots, and the R output, in addition to your comments and interpretation. Your submission for this part should be about 3 pages.
3 Interpreting some values from a journal article (20 marks total)
To answers these questions, you’ll need to get this journal article:
Mograss et al. (2022). The effects of napping on night-time sleep in healthy young adults. Journal of Sleep Research, 31:e13578.
Like with the other journal articles, this is freely available from the U of G library. Perhaps the easiest method of finding it is to search in Omni for the title of the article, and follow the Available online link. You do not have to pay to access any of the articles.
Answer the following questions clearly and concisely. Your submission for this part should be
1 or 2 pages.
a) Find Figure 2(d). Give approximate values for the mean and standard error of the mean for each of the two groups. State whether “mean” here refers to the sample mean or to the true mean.
Give an interpretation of the standard error of the mean for the long nap group, in the context of the problem at hand. (This is still referring to the variable illustrated in Figure 2(d).)
b) Consider again Figure 2(d). In that plot, they report ap-value of 0.17. What test procedure did they use? Give the hypotheses of the test corresponding to that p-value, in words and symbols, and give an appropriate conclusion that relates to the variables understudy. Do not use the phrases ‘reject H0 ’ or ‘do not reject H0 ’ at any point in your response. (You may speak in terms of statistical significance, or strength of evidence, just not in terms of rejecting the null or not.)
c) Now consider Figure 3(d). In that plot, they report ap-value of 0.02. What test were they carrying out? Give the hypotheses of the test corresponding to that p-value, in words and symbols, and give an appropriate conclusion that relates to the variables understudy. Do not use the phrases ‘reject H0 ’ or ‘do not reject H0 ’ at any point in your response. (You may speak in terms of statistical significance, or strength of evidence, just not in terms of rejecting the null or not. Nobody is ‘rejecting’ anything here – we are assessing evidence)
d) Now consider Table 3. In that table, find where it reports a correlation of 0.03 between two variables. What does that 0.03 mean in the context of this problem, and what does the absence of asterisks mean? (Phrase your interpretations in the context of the problem at hand. That is, how they relate to the variables under discussion.) We don’t discuss correlation until the last week of the semester, but the basics are pretty straightforward and I think with a solid knowledge of the foundations of hypothesis testing you will be capable of giving a good response here.
References
Dale, R. (2010). Birth statistics for African (Loxodonta africana) and Asian (Elephas max- imus) elephants in human care: History and implications for elephant welfare. Zoo Biology, 29:87–103.
Mograss et al. (2022). The effects of napping on night-time sleep in healthy young adults. Journal of Sleep Research, 31:e13578.
Seeber et al. (2020). Immune differences in captive and free-ranging zebras (Equus zebra and E. quagga ). Mammalian Biology, 100:155–164.