Statistics for Data Science II · End Term · Jan 2026 · FN
Statistics for Data Science II · End Term · Jan 2026 FN
← Course papers · Start practice / exam
Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.
20 / 20 published solutions
Continuous random variables:
Distribution PDF (fx(k)) CDP (Fx(z)) E[X] Var(X)
0 a<a F
Uniform|a, ] ee ale oe ake arhb (8)
b-a b-a 2 12
1 z>b
0 <0 1 1
ome S 1 ny
Exp(\) de, 2 >0 _ lt 7 7
—_ (= |
Normal(, 0) | oV2n 20? | No closed form LL o
-00 << 00
Bt ie es &.
Gamma(a, 3) Ta” et r>0 3 BP
T(at+8) o4 B-1
Bet or *(1— 2) a ap
nae ni a+8 | @+Bpa+etl)
1. Markov’s inequality: Let X be a discrete random variable taking non-negative values
with a finite mean y. Then,
P(X2e)<
lt
2. Chebyshev’s inequality: Let X be a discrete random variable with a finite mean pr
and a finite variance o?. Then,
3. Weak Law of Large numbers: Let X;, Xo,...,
o.
Define sample mean X =
P(|X—p|2 ko) <
1
Pe
Xit Kote + Xn Then,
n
x i
P(| “MP9s —o
X, ~ iid X with E[X] = p, Var(X) =
4, Using CLT to approximate probability: Let X;, X2,...,Xn ~ iid X with E[X] =
pt, Var(X) =
Cn
Define Y = X; + X)+...+X,. Then,
Y-mp
no
= Normal(0, 1).
5. Bias of an estimator: Bias(,0) = E[6] — 4.
6. Method of moments: Sample moments, Mj(X;, Xo,..., X)= Le Xt
i
Ni=t
Procedure: For one parameter @
e Sample moment: m,
¢ Distribution moment: E(X) = f(@)
¢ Solve for @ from f(@) = m, in terms of m.
ob: replace m; by M, in the above solution.
7. Likelihood of i.i.d. samples: Likelihood of a sampling x, 22,..., 2n, denoted
L(v1,---42n)=]] fx (i: 1,82, --)
i=1
8. Maximum likelihood (ML) estimation:
O;,63,... = arg max TT fx(2j;01,02,...)
PO ca
9. Bayesian estimation: Let X),...,X, ~ i.i.d.X, parameter 9.
Prior distribution of 9 : 0 ~ fo(4).
Samples, S : (X; = 21,...,X, = 2)
Posterior: 9 | (X, = 21,...,Xp = 2p)
Bayes’ rule: Posterior oc Prior x Likelihood
Posterior density « fa(#) x P(X; =a11,...,Xn =an | 9 =6)
10. Normal samples with unknown mean and known variance:
2 Sie X,, ~ iid. Normal(M, 0).
Prior M ~ Normal (tip, 03).
a ea
Posterior mean: ji = X a + Ho (a)
nop +0? no? +0?
11. Hypothesis Testing
e Test for mean
Case (1): When population variance o? is known (z-test)
Test Ho Ha Test statistic | Rejection region
T=xK
right-tailed | jo = pio | pp > flo pe Sa X>e
~_ gi
TX
left-tailed | pp = po | p< po ge X — po X<e
_ vi
Tae
two-tailed | = po | p # po z= X- [X — pig] >
__ ya
Case (2): When population variance o? is unknown (t-test)
Test yeh Hy Test statistic | Rejection region
T=X%
right-tailed | js = pig | @ > flo . X-p X>c
cot Sie
T=%
left-tailed | = po | 1 < po X-p X<e
&
T=
two-tailed | = uo | 1 # Ho ' X= | X-pml>e
aT i
¢ \*-test for variance:
Test Hy Ha Test statistic Rejection region
_1)92
right-tailed | o =o) | 0 > oy | T= fn a ea Soe
0
22
lefttailed | o =a) 0<o | T=" a nyt <2
fl
a
_1)g2 S? > c where — = P(S? > c*) or
two-tailed | ¢=09 | o #09 ri ) wx! 3
% S? < where a P(S? <¢’)
¢ Two samples 2-test for means:
Test ih Hy Test statistic Rejection region
T=X-Y ye
Tight-tlled | yx = po | pu > po X-Yan Norma. +) if Hy is true X-Y>e
1M
T=Y-X i _
Vet-talled | Ha | th < th Y—X~ Nona 2.2) if Hp is true Y-X>e
mm
T=X-Y sem _
twortalled yu = pa | pn # on X-Yx Namal +) if Ho is true X-Y|>e
1%
Useful Data has been mentioned above.
This data attachment is just for a reference & not for an evaluation.
This is a formula/reference card. It supplies probability distributions, estimation formulas and hypothesis-test statistics for later questions. Choose the form appropriate to the model: a sample mean has variance sigma squared divided by sample size, a two-sample difference includes both variances, and significance is calculated under the null hypothesis. The administrative card itself does not require a statistical computation.
**Answer: A.**
A: **Correct:** Acknowledges that the useful reference information is supplied.
B: **Incorrect:** This also describes its reference purpose, but the source selects the first acknowledgement.
Question 3 NAT · 3.0 marks
Let
. The prior distribution of
has the following PMF:
Consider the samples S: {
}. Find the posterior probability
using Bayes' theorem. Enter the answer correct to two decimal places.
Published solution
The sample 1,1,0,1 has three successes and one failure, with likelihood p³(1-p). The prior-weighted likelihood at p=0.8 is 0.6×0.8³×0.2=0.06144; at p=0.2 it is 0.4×0.2³×0.8=0.00256. Bayes' rule gives \[P(P=0.8\mid S)=\frac{0.06144}{0.06144+0.00256}=0.96.\] Use both candidates in the denominator and distinguish the random parameter P from a probability notation P(event).
**Answer: 0.96.**
Question 4 NAT · 3.0 marks
Let
be a sample from a normal distribution having a variance of 25. We wish to test
the hypothesis
against
. Consider a test that rejects
for
,
where
is the sample mean. Find the value of
at a significance level
. Enter the
answer correct to two decimal places.
Published solution
Under H0:mu=0, Xbar is normal with standard deviation sqrt(25/100)=0.5. Significance 0.05 for rejection Xbar>c requires P(Z>c/0.5)=0.05. Using the supplied 95th percentile 1.645 gives c=0.5×1.645=0.8225, rounding to 0.82. The alternative mean 1.5 affects power, not this null-calibrated threshold.
**Answer: 0.82.**
Question 5 NAT · 3.0 marks
The time (in minutes) passengers spend in the airport security line during a quiet period follows a
continuous uniform distribution
. The waiting times (in minutes) from a random sample of 5
passengers are as follows:
Find the method of moments estimate of
.
Published solution
For Uniform[4,theta], E[X]=(4+theta)/2. The observed sample mean is (4+6+7+5+8)/5=30/5=6. Equate the population mean to this sample moment: (4+theta)/2=6, so theta=8. This is a method-of-moments estimate; here it also equals the largest observation, but that equality is not the general derivation.
**Answer: 8.**
Question 6 MSQ · 3.0 marks
Let
be a discrete random variable with PMF as follows:
Suppose
i.i.d.
. Define a new random variable
.
Which of the following option(s) is (are) true about the moment generating function of the random
variable
?
Published solution
The individual MGF is \(M_X(t)=\tfrac15e^{-t}+\tfrac25+\tfrac25e^{2t}=(e^{-t}+2+2e^{2t})/5\). For the independent sum Y=X1+X2+X3, \(E[e^{tY}]=\prod_i E[e^{tX_i}]\). Therefore \(M_Y(t)=[(e^{-t}+2+2e^{2t})/5]^3\), and it is equivalently the product of the three individual MGFs. Sums of independent variables multiply their MGFs, rather than adding them.
**Answer: B, C.**
A: **Incorrect:** This is one variable's MGF, missing the cube for the sum of three.
B: **Correct:** Cubes the common individual MGF correctly.
C: **Correct:** The product identity follows from independence.
D: **Incorrect:** Adds MGFs instead of multiplying them.
E: **Incorrect:** Multiplying one MGF by 3 would give value 3 at t=0, but every MGF has M(0)=1.
Question 7 MSQ · 3.0 marks
Let
be i.i.d. samples from
and
be i.i.d. samples from
. The observed sample means are
and
. We wish to test the
hypotheses:
against
.
Consider a test that rejects
if
Let
denote the significance level of the test and
denote the cumulative distribution function (CDF) of the standard normal distribution.
Express the critical value
in terms of
and
.
Select all the option(s) that apply.
Published solution
The independent sample-mean difference has null mean zero and variance 12/20+21/25=0.60+0.84=1.44, giving standard deviation 1.2. A two-sided test satisfies P(|Z|>c/1.2)=alpha, so \(c=1.2\Phi^{-1}(1-\alpha/2)\). Symmetry also gives \(c=-1.2\Phi^{-1}(\alpha/2)\). The observed means 52 and 49 determine the realised statistic, not the critical-value formula.
**Answer: B, D.**
A: **Incorrect:** Uses the lower alpha quantile without the required sign or two-tail split.
B: **Correct:** Uses the correct upper 1-alpha/2 quantile.
C: **Incorrect:** Uses the wrong tail level and a negative threshold for standard small alpha.
D: **Correct:** Symmetry makes this the same positive threshold as B.
Question 8 MCQ · 2.0 marks
Let
be a discrete random variable with probability mass function:
Consider the random sample {1, 2, 1, 2}. Assume that the prior distribution of
is uniform on
Based on the above data, answer the given subquestions.
Which of the following is the correct likelihood function
based on the given sample?
Published solution
Each observation is Binomial(3,theta). For the ordered sample 1,2,1,2, the binomial coefficients multiply to 3×3×3×3=81. Total successes are 6 and total trials are 4×3=12, leaving 6 failures. Thus L(theta)=81theta^6(1-theta)^6. A likelihood for exact observed values multiplies their individual probabilities.
**Answer: D.**
A: **Incorrect:** Has the wrong combinatorial constant and success/failure powers.
B: **Incorrect:** Uses five success powers although the observed sum is six.
C: **Incorrect:** Has the right powers but the wrong product of binomial coefficients.
D: **Correct:** Uses coefficient 81 and six successes and six failures.
Question 9 NAT · 3.0 marks
Let
be a discrete random variable with probability mass function:
Consider the random sample {1, 2, 1, 2}. Assume that the prior distribution of
is uniform on
Based on the above data, answer the given subquestions.
Find the posterior mean of
using the given prior distribution. Enter the answer correct to one
decimal place.
Published solution
A uniform(0,1) prior is Beta(1,1). The likelihood contributes six success powers and six failure powers, so the posterior is Beta(7,7). Its mean is 7/(7+7)=0.5. Symmetry about one-half provides a check. The likelihood constant 81 cancels when the posterior is normalised.
**Answer: 0.5.**
Question 10 NAT · 3.0 marks
Let
be a discrete random variable with PMF as follows:
Define another random variable
.
Based on the above data, answer the given subquestions.
What is the standard deviation of
? Enter the answer correct to two decimal places.
Published solution
For X taking -1,0,1 with probabilities 1/4,1/2,1/4, E[X]=0 and E[X²]=1/2, so Var(X)=1/2. With Y=4X+2, Var(Y)=4²Var(X)=8 and SD(Y)=sqrt(8)≈2.828427. Round to 2.83. The additive constant shifts the mean but does not alter variance.
**Answer: 2.83.**
Question 11 NAT · 2.0 marks
Let
be a discrete random variable with PMF as follows:
Define another random variable
.
Based on the above data, answer the given subquestions.
Find Cov
.
Published solution
Cov(X,4X+2)=4Cov(X,X)+Cov(X,2)=4Var(X). A constant has zero covariance with X. Here E[X]=0 and E[X²]=1/2, giving Var(X)=1/2. Therefore Cov(X,Y)=4×1/2=2.
**Answer: 2.**
Question 12 MCQ · 2.0 marks
The joint PDF of two random variables
and
is given by
Based on the above data, answer the given subquestions.
Find the value of
.
3
6
Published solution
The joint density is constant 1/k over the rectangle 1<=x<=2,0<=y<=3. Its area is (2-1)(3-0)=3. Total probability must be area times density=3/k=1, so k=3. This normalisation also gives density 1/3 on the rectangle.
**Answer: A.**
A: **Correct:** 3 makes the density integrate to 1.
B: **Incorrect:** k=1/3 would produce total mass 9.
C: **Incorrect:** k=6 would produce total mass 1/2.
D: **Incorrect:** k=1/6 would produce total mass 18.
Question 13 NAT · 3.0 marks
The joint PDF of two random variables
and
is given by
Based on the above data, answer the given subquestions.
Find the value of
. Enter the answer correct to two decimal places.
Published solution
Normalisation gives k=3 and density 1/3 on the full rectangle. The event 1<X<1.5,0<Y<2 has area 0.5×2=1. Probability is area×density=1/3≈0.333333, rounding to 0.33. Because the distribution is continuous, endpoint inclusions do not change this result.
**Answer: 0.33.**
Question 14 MCQ · 2.0 marks
A factory produces light bulbs. The manufacturer claims that the probability
that a randomly
selected bulb is defective is 0.1. Ravi suspects that the defect rate is actually higher than claimed.
To test this, he randomly selects 10 bulbs from the production line. If two or more bulbs are found
to be defective, he rejects the manufacturer's claim; otherwise, he accepts it.
Based on the above data, answer the given subquestions.
Define the null hypothesis and the alternative hypothesis.
Published solution
The manufacturer's claim is p=0.1, and Ravi suspects an increase. Thus use H0:p=0.1 against HA:p>0.1. The alternative direction agrees with rejecting when the number of defective bulbs is unusually large. A two-sided alternative would instead test either an increase or a decrease.
**Answer: B.**
A: **Incorrect:** Tests any change rather than specifically a higher defect rate.
B: **Correct:** Matches the claimed value and Ravi's direction of suspicion.
C: **Incorrect:** Tests a lower rate, the opposite direction.
D: **Incorrect:** Reverses the null claim and alternative structure.
Question 15 NAT · 3.0 marks
A factory produces light bulbs. The manufacturer claims that the probability
that a randomly
selected bulb is defective is 0.1. Ravi suspects that the defect rate is actually higher than claimed.
To test this, he randomly selects 10 bulbs from the production line. If two or more bulbs are found
to be defective, he rejects the manufacturer's claim; otherwise, he accepts it.
Based on the above data, answer the given subquestions.
Find the significance level of the test. Enter the answer correct to three decimal places.
Published solution
Under H0, the defective count N is Binomial(10,0.1). The rule rejects for N>=2, so \[\alpha=P_{0.1}(N\ge2)=1-P(N=0)-P(N=1)=1-0.9^{10}-10(0.1)0.9^9\approx0.263901.\] Rounded to three decimals, enter 0.264. This is the probability of false rejection under the claimed defect rate, not the probability calculated under an unspecified alternative.
**Answer: 0.264.**
Question 16 MCQ · 2.0 marks
Let
be a random variable with mean
and variance
. Let
and
be the sample means
of two independent random samples of sizes
and
, respectively, drawn from the distribution
of
. Consider the estimator
where
and
are constants such that
.
Is
an unbiased estimator of
?
Yes
No
Published solution
Each sample mean has expectation mu. By linearity, E(aXbar1+bXbar2)=a mu+b mu=(a+b)mu=mu because a+b=1. Therefore the estimator is unbiased. Independence is relevant to its variance calculation but is not required for this expectation argument.
**Answer: A.**
A: **Correct:** The expectation equals the target mu.
B: **Incorrect:** The weights summing to one eliminate bias under the common-mean assumption.
Question 17 NAT · 0.5 marks
Let
be a random variable with mean
and variance
. Let
and
be the sample means
of two independent random samples of sizes
and
, respectively, drawn from the distribution
of
. Consider the estimator
where
and
are constants such that
.
Enter the correct option number for
.
Published solution
Independence removes the covariance term, giving Var(mu-hat)=a²Var(Xbar1)+b²Var(Xbar2). Thus blank A is a², option 4. A coefficient scales variance by its square, not its first power.
**Answer: 4.**
Question 18 NAT · 0.5 marks
Let
be a random variable with mean
and variance
. Let
and
be the sample means
of two independent random samples of sizes
and
, respectively, drawn from the distribution
of
. Consider the estimator
where
and
are constants such that
.
Enter the correct option number for
.
Published solution
The second sample mean's contribution is b²Var(Xbar2). Thus blank B is b², option 5. The samples are independent, so no additional cross-covariance term remains.
**Answer: 5.**
Question 19 NAT · 0.5 marks
Let
be a random variable with mean
and variance
. Let
and
be the sample means
of two independent random samples of sizes
and
, respectively, drawn from the distribution
of
. Consider the estimator
where
and
are constants such that
.
Enter the correct option number for
.
Published solution
The first sample has n1 independent observations each with variance sigma², so Var(Xbar1)=sigma²/n1. This expression is option 2. Averaging divides the variance by n1, not n1 squared after the n1 summands have been added.
**Answer: 2.**
Question 20 NAT · 0.5 marks
Let
be a random variable with mean
and variance
. Let
and
be the sample means
of two independent random samples of sizes
and
, respectively, drawn from the distribution
of
. Consider the estimator
where
and
are constants such that
.
Enter the correct option number for
.
Published solution
Substitute the two sample-mean variances and factor out sigma²: Var(mu-hat)=sigma²(a²/n1+b²/n2). Blank D is a²/n1, option 6. Keep the squared weight on the correct sample-size denominator.
**Answer: 6.**
Question 21 NAT · 1.0 marks
Let
be a random variable with mean
and variance
. Let
and
be the sample means
of two independent random samples of sizes
and
, respectively, drawn from the distribution
of
. Consider the estimator
where
and
are constants such that
.
Calculate the value for
. Enter the answer correct to two decimal places.
Published solution
Given a=0.5 and a+b=1, b=0.5. With n1=n2=10 and sigma²=5, Var(mu-hat)=5(0.25/10+0.25/10)=5×0.05=0.25. Because this estimator is unbiased, this variance also equals its mean squared error for estimating mu.
**Answer: 0.25.**