
Large N & Leeuwenhoek (70700173)
Connection with previous lectures
Technically, a random (stochastic) variable is a type of variable in statistics whose possible values depend on the outcomes of a certain random phenomenon.
Different “variables” ![]()
Which is a function,
the random variable or the distribution?
Next step: Random variable (distribution) → population

A sample: 2024 students in our class

Is this a good sample?
A subset of individuals or observations selected from a larger population in such a way that each observation has an equal probability of being chosen.
How can you increase the efficiency?


Only if a sequence of estimators is unbiased and converges to a value, then it is consistent, as it must converge to the true value.

X: a random sample from a probability distribution with parameter θ.
Confidence interval (CI) for the parameter θ, with confidence level γ: An interval determined by random variables u(X) and v(X) with the property: \(Pr\{u(X)<\theta <v(X)\}\ =\ \gamma = 1 - \alpha, \quad \forall\theta.\)
Human language: In a repeatedly sampling, the percentage of the samples that could contain θ
Interpretation
In 100 times sampling of …, there are … samples (… of the chance) that the CI could contain the true value.
How can you get smaller CI?


Solution: A fatter-tailed distribution



🌰 Your friend, who is the accountant for “Dr. Hu’s Amazing Team,” was asked by the organizer to help set a budget for a thank-you lunch after the team’s successful conference organization. The organizer, though unwilling to spend much, didn’t want to seem too stingy either. After calculating the average cost of lunch for a random sample of nine team members, your friend found it to be ¥29, with a ¥3 deviation, and proposed a budget of ¥31 per person. The organizer, however, criticized her, claiming “¥26 is enough” and accusing her of not understanding statistics. Is the organizer PUA your friend?

N =9, (X̄ 29, s 3) vs. 26
PUA = Blaming someone for something they did nothing wrong.
The organizer blamed your friend for a unreasonable budget ⇒ “Unreasonable” means a guess out of the 95% CI of the sample
qt(.975, df = 8)).
What’s the interpretation?
Assuming X1 and X2 are i.i.d,

The “Learning R with Dr. Hu and His Friends” workshop includes two series: “R Survivor” (basic) and “R Expert” (advanced). The five “R Survivor” workshops received 932, 586, 796, 501, and 351 downloads, while the “R Expert” workshops had 771, 917, 326, 825, and 399 downloads.
Which series is more popular?
Set α = 0.05; small N → t.
\[\begin{align} \bar X_1 =& (932 + 586 + 796 + 501 + 351)/5 = 633.2; \bar X_2 = 647.6 \\ S_p^2 =& \frac{2.151268\times 10^{5} + 2.845032\times 10^{5}}{(5 - 1) + (5 - 1)} = 6.245375\times 10^{4};\\ \mu_1 - \mu_2 =& (633.2 - 647.6) \pm 2.3646 (\sqrt{6.245375\times 10^{4}}\sqrt{1/5 + 1/5}), \\ =& -14.4 \pm 364.4763. \end{align}\]
Inference: If we make repeated sampling from the audience size of these lectures, there are 95% of the samples in which the interval between -378.8763 and 350.0763 contains the true mean. The CI covers 0. That is, the difference is no different from zero statistically.
IID

Matched

Independent sample
\[\mu_1 - \mu_2 = (\bar X_1 - \bar X_2) \pm t_{\alpha/2}\sqrt{\frac{S_1^2}{n_1} + \frac{S_2^2}{n_2}}\]
Matched samples
\(D = X_1 - X_2\), then \(\Delta = \bar D \pm t_{\alpha/2}\frac{S_D}{\sqrt{n}}\), where \(S_D = \sqrt{\frac{\sum(D - \bar D)^2}{n - 1}}\).
Matched proportions (Aggregate data)
\(\hat{P}_D = \frac{n_{10} - n_{01}}{n}\), then \(\Delta = \hat{P}_D \pm Z_{\alpha/2} \cdot \sqrt{\frac{n_{10} + n_{01}}{n^2}},\) where \(n\) = Number of matched pairs, \(n_{10}\) = Number of pairs where the first observation is a success and the second is not, \(n_{01}\) = Number of pairs where the first observation is a failure and the second is a success.

Four students must achieve HSK-4 to apply to Chinese universities (fantasy). For higher-tier universities, they need even higher scores (fictional). After reviewing their initial exam results, they underwent preparatory training. The tables below show their performance in two subsequent exams.
Was the preparatory training helpful?
| Student | Tim | Frank | Emily | Elise |
|---|---|---|---|---|
| Before | 57 | 57 | 73 | 65 |
| After | 64 | 66 | 89 | 71 |
| Student | Tim | Frank | Emily | Elise |
|---|---|---|---|---|
| Before | 57 | 57 | 73 | 65 |
| After | 64 | 66 | 89 | 71 |
Set α = 0.05, \[\begin{align} D =& X_1 - X_2 \Rightarrow \bar D = \sum D / n = (7 + 9 + 16 + 6) / 4 = 9.5\\ S_D^2 =& \sum(D_i−\bar{D})^2 = 6.25 + 0.25 + 42.25 + 12.25 = 61 / 3 \Rightarrow S_D \approx 4.51 \\ \therefore \Delta =& 9.5 \pm 3.18\times \frac{4.51}{\sqrt{4}} = 9.5 \pm 7.18 \end{align}\]
Inference: If we make repeated sampling from these students, there are 95% of the samples in which the interval between 2.32 and 16.68 contains the true mean of the difference. The CI is above 0, that is, students did get better.
Gallop drew a pair of 1500 samples from the American population. In the sample of 1980, there are 52% Democrats, and 46% in the 1985 sample. Were the Democrats the same for two years, given the 95% CI?
Solution: Let α = 0.05,
\[\begin{align} \Pi_1 - \Pi_2 &= (0.46 - 0.52) \pm 1.96\sqrt{\frac{0.46 * 0.54}{1500} + \frac{0.52 * 0.48}{1500}} \\ &\approx -0.06 \pm 0.036. \end{align}\]

Inference: If we make repeated sampling from the Amercian population, there are 95% of the samples in which the interval between -0.042 and 0.03 contains the true mean. The CI contains 0. Thus, the proportion of Democrats in 1980 was not different from that in 1985 statistically at the 0.05 level.
Bayesian

Frequentist

Fiducial



