Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Exam Assistance

1 answer below »
1
Western Sydney University
Final Exam - Summer Session 2018
Unit Name: Nature of Data Unit Number: 301114
Number of Questions: 4 Total Number of Pages: 3
Unit Coordinator: Franco Ubaudi Time Allowed: 2 hours (includes reading time)
Value of Questions: Exam questions are worth 10 marks, giving a total of 40 marks. Each question shows
the
eakdown of marks. NB:- question 1.4 provides a choice of two questions to answer (i or ii).
Answering Questions: Answer all questions in an R script. Write the solutions and the code to generate
the solutions in the R script file. Format the text in the script file neatly, so that questions are clearly
numbered and solutions can be identified. Submit the script using vUWS at the end of the exam.
Resources Allowed: This is an open book computer lab exam. This computer test requires the use of R and
vUWS. A computer is to be used to answer questions. No communications software is allowed. No other
devices are allowed.
This paper must be returned to the person running the exam.
The files you require are in vUWS > Assessment 3 > summer2018Exam. Download two files:-
1. exam301114Sum2018.csv
2. download just your answer file _examAnswers.R
The exam submission link is in vUWS > Assessment 3 > summer2018ExamSubmission.
Before the test is started
• Start vUWS and download the data file exam301114Sum2018.csv from vUWS and your answer file
• Start Rstudio and load your answer file (custom R script); _examAnswers.R
• Check all your details are co
ect:- name, student number, etc, in your custom answer file
Do not load the data into R until told to start the exam.
A new medication had been designed to reduce the chance of obtaining the flu. It has been suspected that
the medication has a side effect of increasing the heart rate of its consumer. To examine this effect an
experiment was designed and data collected. Your task is to analyse this data.
The data file contains records of the subu
, before and after heart rate and type of medication of the
experiment participants. The variables are:
• Subu
: the participant’s home subu
,
• MedicationType: the type of medication taken by the participant, either Medication (the flu medication
eing examined) or Placebo (a control, containing no medication),
• HeartRateBefore: the heart rate of the participant before receiving the medication, and
• HeartRateAfter: the heart rate of the participant after receiving the medication.
2
Question XXXXXXXXXX = 10)
Our goal is to examine if the sample is representative of the population and if the allocation of medication
and placebo is random.
1. Compute two frequency tables:
i. 1 × 3 table of frequencies containing the number of participants in each subu

ii. 2 × 3 table of frequencies containing the number of participants from each subu
and the type of
medication given
2. Test if the distribution of subu
s follows the proportions: 50% Pa
amatta, 30% Campbelltown and
20% Penrith. Make sure to write out the two hypotheses, compute the p value, and write a conclusion
for the test.
3. Test if the medication type is independent of subu
. Make sure to write out the two hypotheses,
compute the p value, and write a conclusion for the test.
4. Answer only one of the following two questions!
i. Describe in words how the independence of two variables is defined in terms of their probability.
Write out equations if needed.
ii. Why did you use the chosen hypothesis test? What requirements does it have in order to be
successfully used and were those requirements satisfied? In general, what does the p-value
epresent? Be
ief; consider bullet points.
Question XXXXXXXXXX = 10)
Before we examine the effect of the medication, we first examine if there is any dependence of heart rate on
each participant’s subu
.
1. Compute the sample mean “before medication heart rate” for each subu
.
2. Test if the “before heart rate” mean is equal for all subu
s. Make sure to write out the two hypotheses,
compute the p value, and write a conclusion for the test.
3. Provide the set of 95% confidence intervals for the difference in means between “before heart rate”
measurements for each pair of subu
s. State which pairs of subu
s show a difference in means and
example your choice.
4. A colleague suggests you could perform a hypothesis test for each pair of subu
s using a t.test on each
data pair. Why is this not a good idea?
3
Question XXXXXXXXXX = 10)
To determine the effect of the medication on each participant’s heart rate, we will compare the mean after
medication heart rate for those who have been issued the medication, to the mean after medication heart
ate of those who were issued a placebo.
1. Compute the mean of the “after medication heart rate” for those that received the medication, and the
mean “after medication heart rate” for those that receive the placebo.
2. Test if there is a difference in mean “after medication heart rate” for those that received the medication
compared to those that received the placebo. Make sure to write out the two hypotheses, compute the
p value, and write a conclusion for the test.
3. Compute the 90% bootstrap confidence interval of the mean difference in “after medication heart rate”
etween those that received the medication and those that received the placebo.
4. Describe why it is important to use a control treatment (such as the above placebo) when examining
the effects of medication.
Question XXXXXXXXXX = 10)
Finally, we want to examine the change in heart rate for each participant, regardless of the medication
eceived.
1. Report the slope and intercept for the linear model, modelling the heart rate after medication with
espect to the heart rate before medication.
2. Use a permutation approach to test if the population slope is 1. Make sure to write out the two
hypotheses, compute the p-value and write a conclusion for the test.
3. Compute the 95% confidence interval for the slope.
4. Describe in words how we can determine if the linear model is a good fit of the data.
END OF EXAM
When you have completed your work, remember to submit your script file to
vUWS > Assessment 3 > summer2018ExamSubmission
Make sure to check that the file you submit is the co
ect file. Just to be sure, I recommend that you also e-
mail your R script / exam answers to the unit co-ordinator:-
XXXXXXXXXX
Answered Same Day Jun 12, 2022

Solution

Pooja answered on Jun 13 2022
73 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here