Biostatistics
Time Allowed: Reading – 10 minutes; Writing – 1.5 hours
Exam Conditions: This is a closed-book examination — no material permitted. Writing
is not permitted at all during reading time.
Family Name: ………………………………………. SID: ………………………
Other Names: ………………………………………. Seat Number: ……………..
Please check that your examination paper is complete (20 pages) and indicate by signing below. I have checked the examination paper and affirm it is complete.Assignment Project Exam Help
Marker’s use only
This examination has two sections: Multiple Choice and Extended Answer.
The Multiple Choice Section is worth 50% of the total examination.
Answers to the Multiple Choice questions must be entered on the Multiple Choice Answer Sheet before the end of the examination.
The Extended Answer Section is worth 50% of the total examination.
There are 3 questions. The questions are of equal value.
THE QUESTION PAPER MUST NOT BE REMOVED FROM THE EXAMINATION ROOM.
Page 1 of 20
Multiple Choice Section
In each question, choose at most one option.
Your answers must be entered on the Multiple Choice Answer Sheet.
1. In a medical trial, the placebo effect occurs when
(a) the subject is scared of the trial
(b) the subject responds to the idea of the treatment
(c) the subject is already sick
(d) the subject knows the investigator
(e) there is a historical treatment group
2. In a study on smoking and lung cancer, a possible confounder is NOT
(a) a gene for smoking (b) brand of cigarettes (c) diet
(d) alcohol (e) exercise
Assignment Project Exam Help
(b) relationships between percentages in subgroups are the same when the subgroups are combined.
are separated.
(d) relationships between percentages in subgroups disappear when the subgroups are separated.
(e) a clear trend in individual groups of data is revealed when the groups are pooled together.
4. Suppose a set of bivariate data has a correlation coefficient of 0.90. Which statement is true?
(a) 90% of the points are highly correlated.
(b) 90% of the points fall on a line.
(c) The linear regression line has a slope of 0.9.
(d) 90% of the points can be predicted by a linear regression line.
5. In a dataset of size 6, the mean is 7 and standard deviation is 4. We add 3 to each observation in the data. The new mean and standard deviation are respectively
(a) 7 and 4 (b) 10 and 4 (c) 10 and 7 (d) 7 and 7 (e) 10 and 13
6. A box has a mean 7 and standard deviation 2. Which distribution can best approximate the distribution for the mean of 100 draws?
(a) Normal with mean 7 and standard deviation 2.
(b) Normal with mean 7 and standard deviation 0.2.
(c) Normal with mean 700 and standard deviation 20.
(d) T with degrees of freedom 99, mean 7 and standard deviation 2.
(e) T with degrees of freedom 100, mean 700 and standard deviation 20.
7. For a quantitative data set, the mean and median are the same. Which statement is true?
(a) The histogram is skewed (b) The scatterplot shows a linear trend
(c) The barplot is balanced (d) The boxplot is symmetric
(e) not enough information
8. For a quantitative data set, the interquartile range (iqr) is 1. Which statement is true? Assignment Project Exam Help
(a) The data is skewed. (b) There is no outlier.
9. If Z ∼ N(0,1) then P(−3 ≤ Z ≤ 3) is closest to
10. Which is the output for the following R command?
pnorm(0)
(a) 0 (b) 0.5 (c) 0.7 (d) 0.9 (e) 1
11. Using the linear regression line, what expression would predict y when x = 2.
## ## Call:
## lm(formula = y ~ x)
##
## Coefficients:
## (Intercept) x
## 1.8403 0.8655
(a) 1.8403 − 0.8655 × 2 (b) 1.8403 + 0.8655 × 2 (c) 0.8655 + 1.8403 × 2
(d) 0.8655 − 1.8403 × 2 (e) Not enough information
12. A box contains the numbers 0,2,3,4,6 and 25 draws are made with replacement. The expected sum of draws and the standard error are respectively
library(multicon) box=c(0,2,3,4,6) mean(box) ## [1] 3
popsd(box)
## [1] 2
√ √ √ √ √
(a) 3/25 and 2/ 25 (b) 3 × 25 and 2/ 25 (c) 3 × 25 and 2 × 25
√
(d) 3 × 25 and 2 × 25 (e) 3 × 25 and 2 × 25
13. A box contains the numbers 0,2,3,4,6 and 100 draws are made with replacement. Which R codes calculate the probability that the mean of draws lies within 2.9 to 3.1?
(a) pnorm((3.1-3)/(2*10))-pnorm((2.9-3)/(2*10))Assignment Project Exam Help
(b) pnorm((3.1-3)/(2/100))-pnorm((2.9-3)/(2/100))
(c) pnorm((3.1-3)/(2/10))-pnorm((2.9-3)/(2/10))
14. A box contains the numbers 0,2,3,4,6, each repeated 200 times and 20 draws are made without replacement, which of the following statements about standard error for the sum of draws is TRUE?
(a) It becomes one fourth if the sample size is half.
(b) It drops to 0 if the sample size is 200.
(c) It remains unchanged compared to the with replacement case.
(d) It enlarges by a factor of compared to the with replacement case.
(e) It shrinks by a factor of compared to the with replacement case.
15. A box contains nine “0” and one “1” and 16 draws are made with replacement. Which distribution will best approximate the distribution for the average of draws?
box=c(0,0,0,0,0,0,0,0,0,1) library(multicon) mean(box)
## [1] 0.1
popsd(box) ## [1] 0.3
(a) Normal with mean 0.025 and standard deviation 0.3/4.
(b) Normal with mean 0.1 and standard deviation 0.3/16.
(c) T with degrees of freedom 15, mean 1.6 and standard deviation 0.3*4.
(d) Unknown skew distribution with mean 0.1 and standard deviation 0.3/4.
(e) Unknown skew distribution with mean 0.4 and standard 0.3*4
16. A box contains nine “0” and one “1” and 16 draws are made with replacement. Using the simulation result below, what is the probability that the sum of draws is at least 6?
box=c(0,0,0,0,0,0,0,0,0,1)
sim=replicate(10000,sum(sample(box,16,rep=T)))
table(sim)Assignment Project Exam Help
## sim
## 0 1 2 3 4 5 6 7
17. A marketing company is surveying consumers’ preference for Coke over Pepsi. If p = P(Customer prefers Coke to Pepsi), the null and alternative hypotheses are respectively
(a) H0 : p = 0.5 and H1 : p 6= 0.5 (b) H0 : p = 0.5 and H1 : p > 0.5
(c) H0 : p 6= 0.5 and H1 : p = 0.5 (d) H0 : p = 0.5 and H1 : p < 0.5
(e) H0 : p < 0.5 and H1 : p > 0.5
18. A marketing company is surveying consumers’ preference for Coke over Pepsi. Which box could NOT model the null hypothesis?
(a) 0,1 (b) 0,1,1 (c) 0,0,1,1 (d) 0,0,0,1,1,1 (e) 0,0,0,0,1,1,1,1
19. A marketing company is surveying consumers’ preference for Coke over Pepsi. Out of 100 consumers surveyed, 60 prefer Coke to Pepsi. Which formula gives the test statistic?
box=c(0,1) mean(box)
## [1] 0.5
popsd(box) ## [1] 0.5
20. A test was conducted to test the hypotheses H0 : µA = µB vs H1 : µA 6= µB where µA and µB represent the population mean for group A and B respectively.
##
## Welch Two Sample t-test
##
## data: yield by variety
## t = -4.9994, df = 19.441, p-value = 7.458e-05
## alternative hypothesis: true difference in means is not equal to 0 ## 95 percent confidence interval:
## -0.9293569 -0.3814274
## sample estimates:Assignment Project Exam Help
## mean in group A mean in group B
## 4.052941 4.708333
(a) The test statistic is -4.9994.
(c) Equality of variance assumption is made.
(d) The data are against H0.
(e) The 95% confidence interval of µA − µB excludes 0.
End of Multiple Choice Section
Make sure that your answers are entered on the Multiple Choice Answer Sheet
The Extended Answer Section begins on the next page
Extended Answer Section
Answer these questions in the spaces provided.
Source: http://www.environment.nsw.gov.au/AQMS/search.htm
head(data)
CEAQI NWAQI
[1,] 99 92Assignment Project Exam Help
[2,] 32 44
[3,] 70 82
[4,] 74 96
…
[29,] 41 59
[31,] 34 58
CE=data$CEAQI NW=data$NWAQI summary(CE)
## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 30.00 35.50 41.00 50.77 60.50 108.00
summary(NW)
## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 33.00 38.50 54.00 56.52 67.00 100.00
n = nrow(data) table(CE >= 100)
## FALSE TRUE
## 30 1
table(NW >= 100)
## FALSE TRUE
## 30 1
Look over the R output and then answer the following questions. Assignment Project Exam Help
(iii) Would it be better to report the mean or median as the measure of centre for Sydney’s CE region? Explain.
(i) From the scatter plot, suggest a value for the correlation coefficient between the two Sydney regions. Explain what it represents.
L = lm(NW ~ CE)
Assignment Project Exam Helpround(L$coeff,3)
## (Intercept) CE ## 19.887 0.714
(iii) Assuming a normal distribution, if the percentile of AQI in CE is 50% (median) for a certain day, what would you expect the percentile of AQI in NW?
For another day, the percentile AQI in CE is 90%, which expression, a, b or c, will give the expected AQI in NW? Explain briefly.
a=qnorm(0.9)*cor(CE,NW) b=pnorm(qnorm(0.9)*cor(CE,NW)) c=mean(NW)+qnorm(0.9)*cor(CE,NW)*sd(NW)
2. In a presidential election, there are three candidates and 100,000 eligible voters. It is believed 80% of them will vote and among those who vote, 40% will favor candidate A and 30% will favor candidate B. Before the election, an opinion survey is conducted to evaluate the percentage of support for candidate A. 1000 voters (who will vote) are selected and 42% of them support candidate A.
(a) In the following R codes which define the box model, how many 1 and 0 should be included to represent the selection of voters (who will vote) in this opinion survey?
box=c(rep(1,??),rep(0,??)) mean(box) ## [1] 0.4
library(multicon) popsd(box)
## [1] 0.4898979
N=length(box) n=1000
popsd(box)/sqrt(n) ## [1] 0.01549193 popsd(box)/sqrt(n)*sqrt((N-n)/(N-1))
## [1] 0.0153949
(c) A simulation experiment is conducted with 10000 replicates to check the standard error calculation for the estimate of the proportion of support for candidate A in the opinion poll. State the first and second missing values.
set.seed(12345) means = replicate(??, mean(sample(box, ??, rep = F))) sd(means)
## [1] 0.01537127
(d) A betting company offers the following game:
every $1 bet on candidate A will return $1.5 (including the $1 bet) if A wins,
every $1 bet on candidate B will return $1.2 (including the $1 bet) if B wins andAssignment Project Exam Help
(e) To estimate the difference between the proportions of support for candidate A and B, what tickets should be put in the box?
3. To determine if a new type of fertilizer is different from the type currently in use, researcher Adam took 12 two-acre plots of land scattered throughout a farm. Each plot was divided into two equal-size subplots, one of which was treated with the current fertilizer and the other of which was treated with the new fertilizer. Wheat was planted, and the crop yields were measured. He entered the data in R as below.
current=c(53,32,68,72,61,69,42,39,60,72,75,66) new=c(60,49,66,73,59,67,61,60,58,75,72,68) diff=new-current diff
## [1] 7 17 -2 1 -2 -2 19 21 -2 3 -3 2
(a) Is this study a control experiment or observational study? Explain briefly.
Assignment Project Exam Help
(c) State the null and alternative hypotheses of the test.
(d) He uses R to perform the following preliminary studies.
shapiro.test(diff)
##
## Shapiro-Wilk normality test
##
## data: diff
## W = 0.79007, p-value = 0.00724
par(mfrow=c(1,2)) boxplot(diff) qqnorm(diff) qqline(diff)
Theoretical Quantiles
Interpret these plots and test result.
(e) Adam further performs the following test. Report test statistic and P-value. Then draw conclusion of the test.
t.test(diff)
##
## One Sample t-test
##
## data: diff
## t = 1.8946, df = 11, p-value = 0.08471
## alternative hypothesis: true mean is not equal to 0 ## 95 percent confidence interval: ## -0.7949713 10.6283047 ## sample estimates:
## mean of x ## 4.916667
(f) His colleague Alex argues that the 12 plots of land are essentially the same. Interpret the plots and test result below and explain which t-test he should choose.
var.test(current,new)
##
## F test to compare two variances
##
## data: current and new
## F = 3.6703, num df = 11, denom df = 11, p-value = 0.0412
## alternative hypothesis: true ratio of variances is not equal to 1 ## 95 percent confidence interval: ## 1.056592 12.749462 ## sample estimates:
## ratio of variances
## 3.670284
par(mfrow=c(1,3)) boxplot(current,new)
qqnorm(current)Assignment Project Exam Help
qqline(current) qqnorm(new) qqline(new)
Normal Q−Q Plot Normal Q−Q Plot
(g) Report the test result from Alex. Is the result consistent with the one from Adam?
t.test(current,new,var.equal=F)
##
## ??? Two Sample t-test
##
## data: current and new
## t = -1.0481, df = 16.58, p-value = 0.3096
## alternative hypothesis: true difference in means is not equal to 0 ## 95 percent confidence interval: ## -14.833280 4.999947 ## sample estimates:
## mean of x mean of y ## 59.08333 64.00000
Note
This paper is not a past paper, rather some examples of the style of questions you can expect.
(1) Multiple choice question
Assess specific learning outcomes across the whole course. You will have 20 questions.
(2) Extended answer questions
Require you to explain your statistical thinking and interpret R Output in the context of a real data story. This assesses your ability to read simple R Code and apply your statistical thinking in a specific data story context. You will have 3 questions.
Answer with explanation:
Assignment Project Exam Help
1. (a) (i) 50.77
(ii) Right-skewed with two outliers.
are two outliers for AQI in the CE region.
(iv) One day.
(ii) 19.887 + 0.714 × 40
(iii) First answer: Median of AQI in CE will give median of AQI in NW.
Second answer:
a gives standardised value, b gives percentile and
c gives original value of AQI in NW (reverse of standardisation). So c is the answer.
Explanation: From L10, P.31, the steps are
Step 1: Find the z score in the x direction: zx.
Step 2: Find the predicted z score in the y direction: zy = r ∗ zx. Step 3: Translate zy back to the percentile in the y direction.
That means
In step 1, we need to find the z score for the 90th percentile rank in the CE direction. The qnorm function can help us with this.
qnorm(0.9)
Using, we find this value is 1.28.
qnorm(0.9)*cor(CE,NW)
In step 2, now a is describing this which is to multiply the z-score by the correlation coefficient,.
data point – mean
z score =
sd
Then after some rearranging, we have
data point = (z score × sd) + mean
which is what the R code in c is giving you.
2. (a) 32000 and 48000 respectively (total 100000×0.8 = 80000; Vote A: 80000×0.4 = 32000; Not vote A: 80000 × 0.6 = 48000)
(b) 0.0153949 because finite population adjustment factor should be applied when sampling is done without replacement.
(c) 10000 and 1000 respectively.
(d) The expected gain is 10[0.5 × 0.4 + 0.6 × (−1)] = −4, a loss of $4.
(e) The box should contain
32000 “1” (A “1”, B “0”; difference “1 − 0”),
24000 “−1” (A “0”, B “1”; difference “0 − 1”) and 24000 “0” (A “0”, B “0”; difference “0 − 0”).
3. (a) Control experiment
(b) There are pairs of yield from using current and new fertiliser applied to the same plot of land with equal area.
(c) H0 : µ1 = µ2 vs µ1 6= µ2 where µ1 and µ2 are the mean yield from using current and new fertilisers.
(d) The boxplot is not symmetric and the some points in QQ plot does not lie close to the QQ line. Also the Shapiro Wilk test is significant with P-value less than 0.05. All these indicate that the data do not follow a normal distribution.
(e) The test statistic is 1.8946 and P value is 0.08471 > 0.05. There is not sufficient evidence in the data against H0 that the two fertilisers have the same effect on yield.
Note but not answer: Even though the test fails to find evidence against H0, we can’t claim that the two fertilisers are equal because we have already assumed H0 to be true in all calculation. Hence the failure of normality assumption is not an issue as the result is inconclusive (data consistent with H0).
In case of significant result (P value < 0.05), one should remark that the result
Assignment Project Exam Helpof “significant difference between fertilisers” is valid only when the normality
(g) The test statistic is -1.0481 and P value is 0.3096 > 0.05. Hence the data are consistent with H0 that the two fertilisers have the same effect on yield. Just further note: Although the degrees of freedom is higher than 11, there are more variability within each sample than within the sample of differences.
End of Extended Answer Section
Write your
SID here −→
Family Name: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Other Names: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Seat Number:Assignment Project Exam Help. . . . . . . . . . . . . . . . .
intended oval.
This is the first and last page of this answer sheet
Correct Responses to MC Component of
MATH1015 Biostatistics
Q1 −→ b
Q2 −→ b Q3 −→ a Q4 −→ e
Q5 −→ b
Q6 −→ b
Q7 −→ d
Q8 −→ e
Q9 −→ e
Q10 −→ b
Q11 −→ b
Q12 −Assignment Project Exam Help→ d
Q13 −→ c
Q15 −→ d
Q16 −→ c
Q17 −→ b
Q14 −→ e
Q19 −→ c
Q20 −→ c


