程序代写案例-MATH2099

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
November 2018 MATH2099 Page 2
Answer question in a separate book marked Question 1
1. [20 marks]
i) [4 marks] Let P2(R) be the vector space of all r
eal polynomials of degree
less than or equal to 2 with ordered basis
B = {x2, 1− x, 1 + x}.
a) A polynomial u ∈ P2(R) has coordinate vector [u]B =

⎝ 31
2

⎠ with
respect to B. Find u.
b) Find the coordinate vector [v]B of v = 3x2 + 4x + 6 ∈ P2(R) with
respect to the ordered basis B.
ii) [4 marks] Find the parabola of the form y = αx2 + β which best fits
the points
{(
0
0
)
,
(
2
2
)
,
(
1
2
)
,
(
1
0
)}
in the least squares sense.
iii) [4 marks] The linear transformation T reflects R3 in the y − z plane.
a) Find the standard matrix A of T .
b) Write down (A−1)2018.
iv) [8 marks] Let v1 =

⎝ 10
0

⎠ and v2 =

⎝ 21
2

⎠ be two vectors in R3 and
let W = span{v1,v2}.
a) Use the Gram-Schmidt process to find an orthonormal basis for W .
b) Using the orthonormal basis from a), show that the projection of the
vector z =

⎝ 510
5

⎠ onto W is equal to

⎝ 54
8

⎠.
c) Express z as a sum, z = w1 +w2 where w1 ∈ W and w2 ∈ W⊥.
d) Find a vector y in R3, different from z, with the property that
ProjW (y) = ProjW (z) and ∥y∥ = ∥z∥.
Please see over . . .
November 2018 MATH2099 Page 3
Answer question in a separate book marked Question 3
2. [20 marks]
i) [3 marks] Suppose that V is an n dimensional real vector space, W
is an m dimensional real vector space and that T : V → W is linear.
Exactly 3 out of the following 12 statements are true for all V , W and
T . Write down the numbers of these three true statements.
1) Rank(V ) + Nullity(W ) = Dim(T ).
2) Rank(T ) + Nullity(T ) = Dim(V ).
3) Rank(W ) + Nullity(V ) = Dim(T ).
4) Rank(T ) + Nullity(T ) = Dim(W ).
5) A spanning set for V must contain exactly n vectors.
6) A spanning set for V must contain exactly m vectors.
7) A spanning set for V must contain at least n vectors.
8) A spanning set for V must contain at most n vectors.
9) T (αv1 + v2) = αT (v1) + T (v2) for all v1,v2 ∈ V and α ∈ R.
10) T (αv1 + v2) = T (v1 + αv2) for all v1,v2 ∈ V and α ∈ R.
11) T (αv1 + v2) = αT (v1 + v2) for all v1,v2 ∈ V and α ∈ R.
12) T (αv1 + v2) = T (v1) + αT (v2) for all v1,v2 ∈ V and α ∈ R.
ii) [3 marks] Suppose that A is an 8 × 8 matrix with a single eigenvalue
λ = 3. You are given that Ker(A−3I) is 2-dimensional, Ker(A−3I)2 is 4-
dimensional, Ker(A−3I)3 is 6-dimensional, Ker(A−3I)4 is 7-dimensional
and Ker(A − 3I)5 is 8-dimensional. By considering an appropriate ring
diagram, find a Jordan matrix J similar to A.
Please see over . . .
November 2018 MATH2099 Page 4
iii) [4 marks] Consider the following commutative diagram for a linear
transformation T : R2 → R2.
A
F =
(
3 4
5 7
)
B =
{(
1
0
)
,
(
0
1
)}
R2 R2 B =
{(
1
0
)
,
(
0
1
)}
P Q
D =
{(
2
1
)
,
(
1
1
)}
R2 R2 B =
{(
1
0
)
,
(
0
1
)}
Find the standard matrix A of T .
iv) [7 marks] Let G =
(
5 −4
1 1
)
.
a) By finding all the eigenvalues and eigenvectors of G show that G is
not diagonalisable.
b) Find an invertible matrix P and a Jordan matrix J such that
P−1GP = J .
c) Calculate eGt.
v) [3 marks] Suppose that u, v ∈ Rn and that u ·v = 5. Define the matrix
C to be
C = I − AB
where A = uuT , B = vvT , and I is the n×n identity matrix. Prove that
u is an eigenvector of C and find the associated eigenvalue.
December 2018 Additional Assessment MATH2859 Page 2
1. Answer in a separate book marked Question 1
i) Let X follow the Bernoulli distribution:
p(x) =

1 ⇡, if x = 0
⇡, if x = 1
where 0 < ⇡ < 1.
a) [1 mark] Show that E(X) = ⇡.
b) [2 marks] Show that Var(X) = ⇡(1 ⇡).
c) [3 marks] Assume we have a random sample {X1, . . . , Xn} of size
n from X. The probability ⇡ can be estimated from this sample as
Pˆ =
1
n
nX
i=1
Xi.
Show that the standard error of Pˆ is equal tor
⇡(1 ⇡)
n
.
Make sure you include your reasoning.
ii) (Matlab output relevant to this question can be found at the end of the
question.)
In August this year, Roy Morgan Research published a poll of New
Zealanders on television viewing habits related to sport. The poll of 6,422
randomly selected New Zealanders found that 43.6% of them watch rugby
on the television.
a) [3 marks] Find a 99% confidence interval for the true proportion
of New Zealanders who watch rugby on the television.
b) [3 marks] What assumptions did you make in the above? Where
possible, check if these assumptions are reasonable.
c) [2 marks] Let’s say Roy Morgan Research wanted to estimate the
proportion of rugby viewers to within 1% of its true value (with 95%
confidence). How many people did they need to sample to achieve
this?
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 3
iii) (Matlab output relevant to this question can be found at the end of the
question.)
Assume Rugby New Zealand (the organising body for the sport) want to
be able to demonstrate that the proportion of New Zealanders watching
rugby is in excess of 40% , using a new sample of size n (to be determined).
They want to do this by a suitable hypothesis test.
a) [1 mark] What are the appropriate null and alternative hypotheses
for this test?
b) [1 mark] What is the approximate distribution of the sample pro-
portion Pˆ ,if the null hypothesis is true? Please write your answer as
a function of n.
c) [2 marks] Show that, for the relevant hypothesis test at the 0.01
significance level, the rejection region can be expressed as
pˆ 2

0.4 +
1.139p
n
, 1

where n is the sample size of the study.
d) [2 marks] Suppose the true proportion is 0.45. Find the sample
size n required to ensure the power is at least 80%.
In answering the above questions you can make use of the following
Matlab output:
>> norminv([0.8 0.9 0.975 0.98 0.99 0.995])
ans =
0.8416 1.2816 1.9600 2.0537 2.3263 2.5758
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 4
2. Answer in a separate book marked Question 2
In order to assess the eciency of a certain ‘Memory drug’, allegedly improving
the capacity of students to process and memorise huge volumes of material,
the following experiment was run. Students of a given class were randomly
split into three groups. Before revising for a given exam, the first group was
given the ‘Memory drug’, the second group was given a placebo drug (i.e., one
with no active ingredient) and the third group was given nothing at all. All
the students sat the exam. The scores (out of 100) are shown below for the
three di↵erent groups:
Memory Placebo Nothing
75 74 73
77 76 74
76 75 72
79 78 74
74 74 70
77 77 73
75 75 74
77 71
75
n1 = 7 n2 = 8 n3 = 9
x¯1 = 76.14 x¯2 = 75.75 x¯3 = 72.89
s1 = 1.68 s2 = 1.49 s3 = 1.62
The sample mean and the sample standard deviation of the exam scores have
been computed for each group. Comparative boxplots are given in the figure
below (Group 1 = ‘Memory’, Group 2 = ‘Placebo’, Group 3 = ‘Nothing’).
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 5
1 2 3
Group
70
71
72
73
74
75
76
77
78
79
Sc
or
e
i) [3 marks] What do the boxplots tell you about the distribution of the
exam scores within and between the three di↵erent groups of students?
ii) [3 marks] In order to compare the exam scores across the three groups
of students, we would like to carry out an Analysis of Variance (ANOVA).
a) State three assumptions that need to be valid for ANOVA to be an
appropriate analysis.
b) Comment on whether these assumptions are satisfied here, where
possible, based on the given information.
Assume from now on that these assumptions are valid.
iii) [3 marks] An ANOVA table was partially constructed to summarise the
data. (The entries (1)–(6) in the table are still to be determined.)
Source df SS MS F
Treatment (1) (2) 26.36 10.39
Error (3) 53.25 (4)
Total (5) (6)
Copy the ANOVA table in your answer booklet. Complete the table
by determining the missing values (1)–(6), and explain how they are
obtained.
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 6
iv) (Matlab output relevant to this question can be found at the end of the
question.)
Now carry out the ANOVA F-test:
a) [1 mark] State the appropriate null and alternative hypotheses. De-
fine your notation properly.
b) [1 mark] What would be the distribution of the test statistic F =
MSTr/MSEr if the null hypothesis were true?
c) [1 mark] What is the observed value of the test statistic?
d) [1 mark] Give an approximation of the p-value of this test.
e) [1 mark] What is your conclusion in plain language? Use ↵ = 0.02
as the significance level.
v) (Matlab output relevant to this question can be found at the end of the
question.)
We will now study the di↵erence in mean scores between the ‘Memory
drug’ and placebo groups.
a) [2 marks] Construct a 98% two-sided confidence interval for the
di↵erence between the ‘true’ mean exam score for students taking
the ‘Memory drug’ and students taking the placebo.
b) [1 mark] Does this confidence interval suggest that there is an e↵ect
of the ‘Memory drug’, as compared to a placebo? Explain.
vi) [3 marks] Two-sample t-tests were carried out comparing all possible
pairs of treatments, as summarised in the following table:
Pairwise comparison p-value
MemoryPlacebo 0.6418
MemoryNothing 0.0018
PlaceboNothing 0.0017
Do these results allow you to confirm the conclusion that you have made
in part (iv)(e) above? Explain.
In answering the above questions you can make use of the following Mat-
lab output:
>> norminv([0.95 0.975 0.98 0.99 0.999 0.9999])
ans =
1.6449 1.9600 2.0537 2.3263 3.0902 3.7190
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 7
>> tinv([0.95 0.975 0.98 0.99 0.999 0.9999],23)
ans =
1.7139 2.0687 2.1770 2.4999 3.4850 4.4152
>> tinv([0.95 0.975 0.98 0.99 0.999 0.9999],21)
ans =
1.7207 2.0796 2.1894 2.5176 3.5272 4.4929
>> finv([0.95 0.975 0.98 0.99 0.999 0.9999],2,21)
ans =
3.4668 4.4199 4.7404 5.7804 9.7723 14.7430
>> chi2inv([0.95 0.975 0.98 0.99 0.999 0.9999],2)
ans =
5.9915 7.3778 7.8240 9.2103 13.8155 18.4207
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 8
Statistical Formulae
1. Calculation formulae
For a sample x1, x2, . . . , xn
• Sample mean
x¯ =
1
n
nX
i=1
xi
• Sample variance
s2 =
1
n 1
nX
i=1
(xi x¯)2 = 1
n 1

nX
i=1
x2i nx¯2
!
2. The Binomial distribution
Assume X ⇠ Bin(n,⇡)
• domain of variation : SX = {0, 1, . . . , n}
• probability mass function (pmf) :
p(x) =

n
x

⇡x(1 ⇡)nx, for x 2 SX
Note that
n
x

= nCx =
n!
x!(nx)! .
• cumulative distribution function (cdf) :
F (x) =
bxcX
k=0

n
k

⇡k(1 ⇡)nk
(where bxc denotes the integer part of x).
• expectation :
E(X) = n⇡
• variance :
Var(X) = n⇡(1 ⇡)
3. The Poisson distribution
Assume X ⇠ P()
• domain of variation : SX = {0, 1, 2, . . .}
• probability mass function (pmf) :
p(x) = e
x
x!
, for x 2 SX
• cumulative distribution function (cdf) :
F (x) = e
bxcX
k=0
k
k!
(where bxc denotes the integer part of x). See also the attached Poisson table.
• expectation :
E(X) =
• variance :
Var(X) =
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 9
4. The Uniform distribution
Assume X ⇠ U[↵,]
• domain of variation : SX = [↵,]
• probability density function (pdf) :
f(x) =
1
↵ , for x 2 SX
• cumulative distribution function (cdf) :
F (x) =
x ↵
↵ , for x 2 SX
• expectation :
E(X) = ↵+
2
• variance :
Var(X) = ( ↵)
2
12
5. The Exponential distribution
Assume X ⇠ Exp(µ)
• domain of variation : SX = [0,+1)
• probability density function (pdf) :
f(x) =
1
µ
e
x
µ , for x 2 SX
• cumulative distribution function (cdf) :
F (x) = 1 e xµ , for x 2 SX
• expectation :
E(X) = µ
• variance :
Var(X) = µ2
6. The Normal distribution
Assume X ⇠ N (µ,)
• domain of variation : SX = (1,+1)
• probability density function (pdf) :
f(x) =
1p
2⇡
e
1
2
(xµ)2
2 , for x 2 SX
• cumulative distribution function (cdf) :
F (x) =
Z x
1
1p
2⇡
e
1
2
(yµ)2
2 dy, for x 2 SX
(no closed form)
• expectation :
E(X) = µ
• variance :
Var(X) = 2
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 10
7. Sampling distributions
7.1. Sample mean.
7.1.1. known variance. Let X¯ be the sample average from a random sample of size n from a population with mean µ
and standard deviation . Under appropriate conditions,
Z =
p
n
X¯ µ

⇠ N (0, 1)
(exact result if the population distribution is normal, approximate result if the population distribution is not normal
but n > 30)
7.1.2. unknown variance. Let X¯ and S be the sample average and standard deviation from a random sample of size n
from a normal population with mean µ. Under appropriate conditions,
T =
p
n
X¯ µ
S
⇠ tn1
If the population is not normal but n is large enough (n > 40), we can also write
T =
p
n
X¯ µ
S
⇠ N (0, 1)
approximately
7.2. Sample proportion. Let pˆ be the sample proportion of ‘successes’ where the number of trials is n and the true
probability of a success is ⇡. Under appropriate conditions,
p
n
pˆ ⇡p
⇡(1 ⇡) ⇠ N(0, 1)
approximately when n⇡(1 ⇡) > 5
7.3. Sample variance. Let S2 be the sample variance from a random sample of size n from a normal population with
variance . Under appropriate conditions,
(n 1)S2
2
⇠ 2n1
7.4. Di↵erence in sample means.
7.4.1. variances 21 and
2
2 known. For two independent samples of size n1 and n2 from two populations with means µ1
and µ2 and standard deviations 1 and 2 respectively, let X¯i be the sample average of sample i for i = 1 and 2. Under
appropriate conditions,
(X¯1 X¯2) (µ1 µ2)q
21
n1
+
2
2
n2
⇠ N (0, 1)
(exact result if both population distributions are normal, approximate result if they are not but n1, n2 > 30)
7.4.2. variances 21 and
2
2 unknown;
2
1 =
2
2. For two independent samples of size n1 and n2 from two normal
populations with means µ1 and µ2 respectively and common standard deviation , let X¯i and Si be the sample average
and sample standard deviation of sample i for i = 1 and 2. Under appropriate conditions,
(X¯1 X¯2) (µ1 µ2)
Sp
q
1
n1
+ 1n2
⇠ tn1+n22,
where Sp is the pooled sample standard deviation,
Sp =
s
(n1 1)S21 + (n2 1)S22
n1 + n2 2 .
7.4.3. variances 21 and
2
2 unknown;
2
1 6= 22. For two independent samples of size n1 and n2 from two normal
populations with means µ1 and µ2 and standard deviations 1 and 2 respectively, let X¯i and Si be the sample average
and sample standard deviation of sample i for i = 1 and 2. Under appropriate conditions,
(X¯1 X¯2) (µ1 µ2)q
S21
n1
+ S
2
2
n2
⇠ t⌫ ,
where
⌫ =
(s21/n1 + s
2
2/n2)
2
(s21/n1)
2
n11 +
(s22/n2)
2
n21
(rounded down to the nearest integer)
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 11
7.5. Ratio of sample variances. Let S21 and S
2
2 be the sample variances from two independent random samples of
size n1 and n2 from normal populations with variances 21 and
2
2 respectively. Under appropriate conditions,
S21/
2
1
S22/
2
2
⇠ Fn11,n21
8. Simple linear regression
Consider the simple linear regression model Y = 0 + 1X + ✏ where ✏ ⇠ N (0,)
The least squares estimators ˆ0 and ˆ1 of 0 and 1 are
ˆ1 =
SXY
SXX
ˆ0 = Y¯ ˆ1X¯
where
SXY =
X
i
(Xi X¯)(Yi Y¯ ) SXX =
X
i
(Xi X¯)2.
An estimator of is
S =
sP
i(Yi ˆ0 ˆ1Xi)2
n 2 .
Under fixed design :
p
sxx
ˆ1 1
S
⇠ tn2
ˆ0 0
S
q
1
n +
x¯2
sxx
⇠ tn2
Let x0 denote the predictor value for a response yet to be observed :
i) a 100⇥ (1 ↵)% confidence interval for the mean response at x0 is24yˆ(x0)± s tn2;1↵/2
s
1
n
+
(x0 x¯)2
sxx
35
where yˆ(x0) = bˆ0 + bˆ1x0;
ii) a 100⇥ (1 ↵)% prediction interval for the response at x0 is24yˆ(x0)± s tn2;1↵/2
s
1 +
1
n
+
(x0 x¯)2
sxx
35
9. ANOVA
• Total sum of squares :
SSTot =
kX
i=1
niX
j=1
(Xij X¯)2
• Treatment sum of squares :
SSTr =
kX
i=1
ni(X¯i X¯)2
• Error sum of squares :
SSEr =
kX
i=1
niX
j=1
(Xij X¯i)2
• Under the assumption of equality of means in each of the k groups of a one-way Analysis of Variance,
F =
MSTr
MSEr
⇠ Fk1,nk,
where n is the total number of observations.
Please see over . . .
December 2018 Additional Assessment MATH2859 Page 12
END OF EXAMINATION

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468