Problem 1 a) In class we discussed that if x1, x2, . . . , xn is an iid sample from a normal population with expected value µ and variance σ2, then ns follows a chi- squared distribution with n− 1 degrees ofΣfreedom (where s2 is tΣhe uncorrected
directly that this statement is true in a sample with n = 2 elements.
b) (optional) Assume that the statement above is true for a sample with
ks2
n = k elements, that is (k) follows a chi-squared distribution with k 1 degrees
of freedom for an arbitrary positive integer k 2. Show that this implies that
(k+1)s2
(k+1)
σ2
follows a chi-squared distribution with k degrees of freedom. (Here
2
(k)
2 (k+1)
denote the uncorrected sample variance calculated from a sample
with k and k + 1 elements, respectively.)
Problem 2 (Analytic derivation of the sampling distribution)
Let X be a uniform random variable on the [0, 1] interval. Let us draw a random sample with n = 2 elements from this distribution: the sample is (x1, x2).
Define sample statistics s as the sum of the sample elements: s = x1 + x2.
a) Find the cumulative distribution function (cdf) of sample statistics s! (Hint: in order to calculate Fx1+x2 (a), you will have to calculate the probabilities P (x1 + x2 a). For this, you can use the proof on page 55 of the presentation file “lecture1.pdf”(page title “Special properties / 3”), or you can use a geometric proof as well.)
b) Find the probability density function (pdf) of the sample statistics s.
Problem 3 We can extend the previous problem to the random sample with n = 3 elements, where we define sample statistics s as s = x1+x2+x3. A similar but much more tedious calculation shows that the cdf of sample statistics s is now (you do not have to derive these results!!!):
a) Fs(a) = P (s ≤ a) = 0 if a ≤ 0,
b) F (a) = P (s ≤ a) = a3 if 0 ≤ a ≤ 1,
c) F (a) = P (s ≤ a) = −a3 + 3a2 − 3a + 1 if 1 ≤ a ≤ 2,
d) F (a) = P (s ≤ a) = a3 − 3a2 + 9a − 7 if 2 ≤ a ≤ 3,
e) Fs(a) = P (s ≤ a) = 1 if a ≥ 3.
Find the pdf of the sampling distribution of sample statistics s. Plot this pdf (i.e. when n = 3) together with the pdf that you found in the previous problem for the n = 2 case.
Problem 4 Suppose that random variable X is uniformly distributed on the
interval [0; B], so its probability density function is f (x) = 1 if 0 ≤ x ≤ B and
f (x) = 0 otherwise. Then its cumulative distribution function is F (x) = B if
0 x B (and F (x) = 1 for x > B and F (x) = 0 for x < 0). We know that
for this distribution, the expected value is E(X) = µ = B , and the variance is
V ar(X) = σ2 = B2 .
Let us draw an iid sample of size n from this distribution: x1, x2, . . . , xn . We would like to estimate µ = B , the expected value of X with two estimators:
M
µ^1 = x (the sample mean) and µ^2 = , where M is the sample maximum, i.e.
the largest element of the sample: M = max x1, x2, . . . , xn .
a) Find the cumulative distribution function (cdf) of the sampling distribu-
tion of M , i.e. for each real number m find F (m) = Pr (M m).
b) Find the pdf of M , f (m), and calculate E(M ) and V ar(M ).
c) Find E(µ1), V ar(µ1), E(µ2) and V ar(µ2).
d) Are µ1 and µ2 unbiased estimators of µ? Are they asymptotically unbi- ased? Are they consistent?
e) According to the MSE-criterion, which estimator is better? Does this contradict to what we discussed in class, i.e. that µ1 is a BLUE for µ?
Problem 5 Let X and Y be two independent Bernoulli(p) random variables with parameter 0.5 ≤ p ≤ 1. We have a random sample of size n from both distributions: {x1, x2, . . . , xn} and {y1, y2, . . . ,Σyn}, and theΣtwo samples are
n q
i=1 i i . Show that p = 1 + 1 + xy − x − y
n n
is a consistent estimator of
n ^ 2 4 2 2
Problem 6 (Comparing estimators via simulating their sampling distributions) Suppose that X is a uniform random variable on the [0, 1] interval. Let us draw a random sample of n = 3 elements from this distribution: x1, x2, x3. Let
us define two sample statistics: x = x1+x2+x3 , and m = Median(x1, x2, x3).
a) Calculate E(x) and V ar(x).
b) The analytical derivation of E(m) might be difficult, but what do you think it can be? Why?
c) In Excel, draw 3000 different random samples of n = 3 elements, and calculate x and m for each of these samples.
d) From your 3000 observations on x and m, ”estimate” E (x) , V ar (x) , E(m) and V ar(m). Compare your estimates about E (x) , V ar (x) , E(m) to your an- swers in a) and b).
e) If you wanted to estimate the expected value of random variable X (i.e.
E(X)), which estimator would you prefer: x or m? Why?
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme