Bismillahir Rahmanir Rahim
STA
2
55H
1
: Statistical Theory
Assignment
Winter 2020
Submission deadline: Mar
3
0, 11.59pm (Late submissions will not be accepted)
Instructions on completing the assignment
The numerical calculations involved in this assignment are simple and you are already familiar with
them (hopefully). The goal of this work is to help you “see” some of the theorems and concepts
we have learned or used in this course using empirical data. Calculations are mostly repetitive i
n
nature! I suggest using R (or any other programming language that you are comfortable with). If
you don’t feel comfortable with R, for question 1 and 2, you can use microsoft excel.
Instructions on creating documents for submission
• Please create 3 separate pdfs (one for each question).
• If you are familiar with R-markdown please use it. If you are not familiar with R-markdown,
you can write your answers using microsoft word and in the end save it as pdfs. Pdf is the
only acceptable format of files.
• We will use crowdmark for submission and grading. You will have to upload three separate
documents as your answers to three separate questions. Crowdmark links to upload your
documents will be emailed to you later this week.
Academic Integrity
You are allowed work in pairs. If you need clarification on any of these questions, you are allowed
to ask questions on Piazza. Don’t ask for solutions to anyone. Do not share your codes or
answers on any platform with anyone other than your assignment partner.
1
Question 1 [10 points]. Suppose you have a population of size 5 [i.e. N=5]. You measure some
quantity (X) and the corresponding numbers are:
21, 22, 23, 2
4
, 25
a) Calculate the population mean (µ)
b) Calculate the population variance (σ2) using the formula σ2 =
∑
N
j=1(Xj−µ)
2
N
c) Imagine you are taking samples (of size n = 3) from this population with replacement.
Write down every possible way that you could have a sample of size 3 with replacement from
this population. (hint: there will 5*5*5 = 125 possible combinations)
Help: if you are struggling with figuring out the combinations try this code in R:
expand.grid( c(21:25), c(21:25), c(21:25) )
d) For each of these samples of size 3, calculate the sample mean and record it (either as a new
object in R or as a new column if you are using excel). Lets call this new column X bar. So you
should have 125 values in this column.
e) You should have noticed that the values in the X bar column are repetitive. For example,
21.3333333 will show up 3 times.
Construct a frequency table based on the column X bar. [i.e. write down which values showed up
how many times]. Now using the frequencies (also known as counts) calculate proportion of each
of those repeated values. [For example: proportion of 21.3333333 will be 3/125]
f) Plot these proportions against the values and connect the points using a non-linear line. Does
the shape of this plot look like any known distribution? Name the distribution.
g) Using the table of proportions or otherwise, calculate the mean of these 125 numbers (values
under X bar) and compare it to your answer of 1(a).
h) Using the table of proportions or otherwise, calculate the variance of these 125 numbers. Use the
population variance formula (i.e. divide by 125 not 124). What is the relationship of this answer
to your answer of 1(b)?
i) Which theorem did you demonstrate empirically in part f, g and h?
(No output needed for part(c and d) of this question)
2
Question 2 [10 points]. This question continues from question 1(c). For each of these sample of
size 3, calculate the sample variance using the following two formulas
S2 =
1
n − 1
∑
(Xi − X̄)2
and
σ̂2 =
1
n
∑
(Xi − X̄)2
Assume the population variance, σ2 = 2.
(you should get 125 different values of S2 and and 125 different values of σ̂2)
a. By calculating (numerically using the 125 different values) Bias[S2] and Bias[σ̂2] check the
unbiasedness of these two estimators.
b. By calculating all three components separately check the following identity
MSE[σ̂2] = var[σ̂2] + (Bias[σ̂2])2
3
Question 3 [10 points]. In week 6, we demonstrated an R code that replicates the sample
distribution of X̄. Here is the code that was used in the lecture.
Simply change the distribution and number of samples on line 2 of this code to do this question.
Search online for this keywords : ”runif” and ”rchisq”.
Produce the density of X̄ = X1+X2+…+Xn
n
a) when n = 2, X ∼ Unif[0, 1]
b) when n = 5, X ∼ Unif[0, 1]
c) when n = 5, X ∼ χ2df=2
d) when n = 30, X ∼ χ2df=2
e) when n = 5, X ∼ χ2df=50
(Ans to part(a) to Pat(e) are 5 different graphs)
f) CLT says for large n, X̄ converges(in distribution) to a Normal distribution.
By comparing your graphs from parts (a) to (e), can you comment on how large n has to be
in order for X̄ to converge to a Normal distribution.
g) A quick way to plot any distribution in R is to draw a large sample from a distribution and plot its
density. For example ”plot(density(rnorm(100000,mean=10,sd=2)))” will produce a N(10,4) curve.
Plot three separate density curves for Unif[0, 1], χ2df=2 andχ
2
df=50. Looking at the skewness of these
three curves, what comments can you make on the question asked in part(g)?
4
We provide professional writing services to help you score straight A’s by submitting custom written assignments that mirror your guidelines.
Get result-oriented writing and never worry about grades anymore. We follow the highest quality standards to make sure that you get perfect assignments.
Our writers have experience in dealing with papers of every educational level. You can surely rely on the expertise of our qualified professionals.
Your deadline is our threshold for success and we take it very seriously. We make sure you receive your papers before your predefined time.
Someone from our customer support team is always here to respond to your questions. So, hit us up if you have got any ambiguity or concern.
Sit back and relax while we help you out with writing your papers. We have an ultimate policy for keeping your personal and order-related details a secret.
We assure you that your document will be thoroughly checked for plagiarism and grammatical errors as we use highly authentic and licit sources.
Still reluctant about placing an order? Our 100% Moneyback Guarantee backs you up on rare occasions where you aren’t satisfied with the writing.
You don’t have to wait for an update for hours; you can track the progress of your order any time you want. We share the status after each step.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
Although you can leverage our expertise for any writing task, we have a knack for creating flawless papers for the following document types.
From brainstorming your paper's outline to perfecting its grammar, we perform every step carefully to make your paper worthy of A grade.
Hire your preferred writer anytime. Simply specify if you want your preferred expert to write your paper and we’ll make that happen.
Get an elaborate and authentic grammar check report with your work to have the grammar goodness sealed in your document.
You can purchase this feature if you want our writers to sum up your paper in the form of a concise and well-articulated summary.
You don’t have to worry about plagiarism anymore. Get a plagiarism report to certify the uniqueness of your work.
Join us for the best experience while seeking writing assistance in your college life. A good grade is all you need to boost up your academic excellence and we are all about it.
We create perfect papers according to the guidelines.
We seamlessly edit out errors from your papers.
We thoroughly read your final draft to identify errors.
Work with ultimate peace of mind because we ensure that your academic work is our responsibility and your grades are a top concern for us!
Dedication. Quality. Commitment. Punctuality
Here is what we have achieved so far. These numbers are evidence that we go the extra mile to make your college journey successful.
We have the most intuitive and minimalistic process so that you can easily place an order. Just follow a few steps to unlock success.
We understand your guidelines first before delivering any writing service. You can discuss your writing needs and we will have them evaluated by our dedicated team.
We write your papers in a standardized way. We complete your work in such a way that it turns out to be a perfect description of your guidelines.
We promise you excellent grades and academic excellence that you always longed for. Our writers stay in touch with you via email.