首页 > > 详细

解析MAST20005/MAST9005编程、JSP语言辅导留学生、解析Python、数据结构语言讲解

MAST20005/MAST90058: Assignment 2
Due date: 10am, Friday 14 September 2018
Instructions: Questions labelled with ‘(R)’ require use of R. Please provide appropriate R
commands and their output, along with su cient explanation and interpretation of the output
to demonstrate your understanding. Such R output should be presented in an integrated
form. together with your explanations; do not attach them as separate sheets. All
other questions should be completed without reference to any R commands or output, except for
looking up quantiles of distributions where necessary. Make sure you give enough explanation
so your tutor can follow your reasoning if you happen to make a mistake. Please also try to
be as succinct as possible. Each assignment will include marks for good presentation and for
attempting all problems.
Problems:
1. Consider question 2(b) from Assignment 1. Calculate a 95% con dence interval for .
2. The blood alcohol content (BAC) of a person will rise after drinking alcoholic drinks such
as beer or wine. Each person’s BAC responds di erently based on many physiological
factors. In Australia, a person must have a BAC lower than 0.05 in order to legally drive.
(a) You wish to do a study of the impact of drinking on whether people can legally
drive. You wish to estimate the proportion of people who can legally drive half an
hour after drinking four standard drinks of beer. To have 95% probability of getting
such an estimate to within 0.1 of the true proportion, how many people would you
need to enrol in your study?
(b) A new drug has been developed that rapidly digests alcohol and thus reduces people’s
BAC. You wish to conduct a trial of this drug to assess its claimed e ect. You will
repeat the same test as above (four standard drinks, measure BAC after half an
hour) for n people who take the drug and another n who will not take the drug.
You will then compare the proportion of people who can legally drive in each group
by calculating a 95% con dence interval for the di erence in proportions. What n
do you need in order to be able to con dently detect a 0.1 di erence in proportions
with 95% probability (e.g. by the interval being narrow enough to exclude zero)?
(c) Your colleague suggests that you should compare the di erence in BAC directly
rather than whether the study subjects can legally drive or not. Suppose that
the BAC of people under the study conditions who do not take the drug has a
N(0:04;0:012) distribution.
i. Suppose the drug reduces the mean BAC by and does not change the variance.
What value of leads to a 0.1 increase in the proportion of people who can
legally drive?
ii. Assuming this is the true value of , what value of n do you need in order
for a 95% con dence interval to exclude zero? (Assume you know the common
= 0:01, but not the population means.)
3. (R) Enter the following command in R to access the Animals dataset:
> data(Animals, package = "MASS")
1
(Note that this requires the MASS package; if you don’t have it yet, install it rst.) You
will now have a variable called Animals in your R session which is a data frame. with
measurements of the average body weight (kg) and average brain weight (g) of various
animals.
(a) We wish to t a simple linear regression model to relate these two measurements,
but the raw data are unsuitable for this in their current form. Why?
(b) Take the logarithm of all of the measurements and t a simple linear regression
model (show an appropriate summary of the model t). Explore the model t via
relevant diagnostic plots. What do you notice?
(c) Omit three animals that are clearly di erent from the rest, re t the regression model
(again, show an appropriate summary). Show a plot of the data and regression line
together.
(d) Give a 95% con dence interval for the average brain weight of camels that weigh on
average 500 kg.
4. Plants convert CO2 in the atmosphere, along with water and energy from sunlight, into the
energy they need for growth and reproduction. Experiments were performed with normal
air atmospheric conditions and those with enriched CO2 concentrations to determine the
e ect on plant growth. The plants were given the same amount of water and light for
a four week period. The following table summarises the data for the plant growths in
grams.
Condition Sample size Mean Standard deviation
Normal air 12 4.16 0.914
Enriched air 8 5.11 2.592
Based on these data, determine whether CO2 enriched atmosphere increases plant growth.
5. (R) Let p1 be the proportion of babies with low birth weight (below 2.5 kg) in Africa and
p2 be the proportion in the Americas. Respective random samples from each continent,
of size n1 = 900 and n2 = 700, gave y1 = 140 and y2 = 80 babies with a low birth
weight. Is there evidence that the rates di er between the two continents? Set this up as
a hypothesis test.
(a) State appropriate null and alternate hypotheses.
(b) Carry out a test that has signi cance level = 0:05. What is your conclusion?
(c) What would be your decision if = 0:01?
(d) Give a 95% con dence interval for the di erence in rates.
6. (R) Consider a geometric random variable X with pmf
Pr(X = xjp) = p(1 p)x; x = 0;1;2;:::
A single observation of such a variable is used to test H0 : p = 0:3 against H1 : p = 0:1.
The null hypothesis is rejected if the observed value is greater than or equal to 4.
(a) What is the probability of committing a Type I error?
(b) What is the probability of committing a Type II error?
(c) Draw a power curve for this test for all possible alternative values of p (not just 0.1).
(d) Find a test of these hypotheses that has an approximate signi cance level of 0.05.
What is the actual signi cance level of your test?

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!