AB1202 19202 Quiz2 Prep Special Tutorial (Solns) Jan'21nokmcl

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

AB1202 1920S2 Quiz 2 Prep Special tutorial: Solutions

1. 2.

4.

3. 0.08196

5. There is an important difference between this question & Q2, for which sigma is known => z
For this question, sigma is NOT known => t => qt => need to specify df (n-1).
So, we are trying to find n using qt, but, we need to specify an n for the qt!
Chicken-and-egg situation! That explains the need for iterations.
The first iteration will be based on the sample of 50.
Hence, for the first iteration, we use n = 50 (df = 49) for qt.
You will get 101, which means you need to “top-
up” your sample size by an additional 51 units.
Iterate using n = 101 ...

Iterate till 2 consecutive iterations give the same


round-up integer, in this case, 98.
This means that n has to be at least 98 to
guarantee the specified max error of 0.001mm.

Those who are R-savvy, can use the conditional while loop to iterate:
e=1
i=49
while (e>0.001) {e=qt(0.995,i)*0.00375/sqrt(i+1)
print(e)
print(i)
i=i+1}
print(i)

Note: Iterating for n is beyond the scope of this semester’s AB1202.


6.

7.

8.
9.

R computes variances and covariances for samples only. When using R to compute
these population parameters, please remember to apply the correction factor.
Note however that this is beyond the scope of AB1202.
FAQ: How is the correction factor obtained?
In the formula for sample variance, the denominator is n-1.
But, in the formula for POPN variance, the denominator is N.
R will always take your data as a sample.
So, when you give it 10 data-points, it will use 9 in the denominator.
But, in my Q7, the 10 data-points in the question constitute the popn.
So, the denominator should be 10 instead of 9!
That’s why the correction factor is 9/10.
In general, the correction factor will be (n-1)/n.

y x
300 200
300 100
400 200
300 200
300 200
300 100
300 200
400 100
300 200
300 200
µ 320 170
σ 40.00 45.83
s 42.16 48.30

σ2 1600 2100
s2 1778 2333
___________________________________________________________________________

ch.Tan@NBS Jan’21

You might also like