Comprehensive Exercises

I. Random Events and Probability

Problem 1

A bag holds 5 white balls and 3 black balls. Two balls are drawn at random. Find: (1) the probability that both are white; (2) the probability that one is white and one is black.

classical probabilitycombinationscomputing a probability

Approach:

Drawing balls from a bag is a classical probability problem: first count the total number of ways to draw, then count the favourable ways for each condition, and finally get the two probabilities from “favourable / total”.

Steps:

  1. Total number of ways: C82=28C_8^2 = 28
  2. (1) Both white: C52=10C_5^2 = 10, so the probability P1=1028=514P_1 = \frac{10}{28} = \frac{5}{14}
  3. (2) One white and one black: C51C31=15C_5^1 C_3^1 = 15, so the probability P2=1528P_2 = \frac{15}{28}

Answer: (1) 514\frac{5}{14}; (2) 1528\frac{15}{28}.

Problem 2

A factory has three machines A, B and C producing the same product, with output shares of 25%, 35% and 40% and defect rates of 5%, 4% and 2% respectively. One product is taken at random. Find: (1) the probability that it is defective; (2) if it is defective, the probability that machine A produced it.

the law of total probabilityBayes' theoremconditional probability

Approach:

To find the probability of a defective product you first use the law of total probability to combine the defect rates of the three machines; then the reverse question — “given that it is defective” — calls for Bayes’ theorem to find the probability that it came from machine A.

Steps:

  1. Let A1,A2,A3A_1, A_2, A_3 denote that the product was made by machines A, B and C respectively, and let BB denote that the product taken is defective.
  2. P(A1)=0.25,P(A2)=0.35,P(A3)=0.40P(A_1)=0.25, P(A_2)=0.35, P(A_3)=0.40
  3. P(B∣A1)=0.05,P(B∣A2)=0.04,P(B∣A3)=0.02P(B|A_1)=0.05, P(B|A_2)=0.04, P(B|A_3)=0.02
  4. (1) The law of total probability: P(B)=∑i=13P(Ai)P(B∣Ai)=0.25×0.05+0.35×0.04+0.40×0.02=0.0125+0.014+0.008=0.0345P(B) = \sum_{i=1}^3 P(A_i)P(B|A_i) = 0.25\times0.05 + 0.35\times0.04 + 0.40\times0.02 = 0.0125 + 0.014 + 0.008 = 0.0345
  5. (2) Bayes’ theorem: P(A1∣B)=P(A1)P(B∣A1)P(B)=0.01250.0345=2569≈0.362P(A_1|B) = \frac{P(A_1)P(B|A_1)}{P(B)} = \frac{0.0125}{0.0345} = \frac{25}{69} \approx 0.362

Answer: (1) P(B)=0.0345P(B) = 0.0345; (2) P(A1∣B)=2569≈0.362P(A_1|B) = \frac{25}{69} \approx 0.362.

II. Numerical Characteristics of Random Variables

Problem 3

The probability density of a random variable XX is f(x)={ax+b,0<x<10,otherwisef(x) = \begin{cases} ax + b, & 0 < x < 1 \\ 0, & \text{otherwise} \end{cases}, and E(X)=712E(X) = \frac{7}{12}. Find: (1) the constants a,ba, b; (2) D(X)D(X).

probability densitymathematical expectationvariancea continuous random variable

Approach:

The density function contains unknown constants, so first use the normalisation condition to set up one equation, then use the given expectation to set up another, solve the system to fix aa and bb, and then compute the variance with the formula for a continuous random variable.

Steps:

  1. (1) By normalisation: ∫01(ax+b)dx=a2+b=1\int_0^1 (ax+b) dx = \frac{a}{2} + b = 1
  2. E(X)=∫01x(ax+b)dx=a3+b2=712E(X) = \int_0^1 x(ax+b) dx = \frac{a}{3} + \frac{b}{2} = \frac{7}{12}
  3. Solve the system: {a2+b=1a3+b2=712\begin{cases} \frac{a}{2} + b = 1 \\ \frac{a}{3} + \frac{b}{2} = \frac{7}{12} \end{cases} From the first equation b=1−a2b = 1 - \frac{a}{2}, substitute into the second: a3+12−a4=712\frac{a}{3} + \frac{1}{2} - \frac{a}{4} = \frac{7}{12} a12=112\frac{a}{12} = \frac{1}{12}, so a=1a = 1 and b=12b = \frac{1}{2}
  4. (2) E(X2)=∫01x2(x+12)dx=∫01(x3+x22)dx=14+16=512E(X^2) = \int_0^1 x^2(x+\frac{1}{2}) dx = \int_0^1 (x^3 + \frac{x^2}{2}) dx = \frac{1}{4} + \frac{1}{6} = \frac{5}{12}
  5. D(X)=E(X2)−[E(X)]2=512−(712)2=512−49144=60−49144=11144D(X) = E(X^2) - [E(X)]^2 = \frac{5}{12} - (\frac{7}{12})^2 = \frac{5}{12} - \frac{49}{144} = \frac{60-49}{144} = \frac{11}{144}

Answer: (1) a=1,b=12a=1, b=\frac{1}{2}; (2) D(X)=11144D(X) = \frac{11}{144}.

Problem 4

Let X∼N(0,1)X \sim N(0, 1) and Y=X2Y = X^2. Find the covariance and the correlation coefficient of XX and YY, and decide whether they are independent.

covariancecorrelation coefficientindependencethe normal distribution

Approach:

First find the mathematical expectations of XX and YY together with E(XY)E(XY), and then use the definitions of the covariance and the correlation coefficient; independence has to be judged from the functional relationship, and cannot be read off a correlation coefficient of zero alone.

Steps:

  1. E(X)=0E(X) = 0, and E(Y)=E(X2)=D(X)+[E(X)]2=1E(Y) = E(X^2) = D(X) + [E(X)]^2 = 1
  2. E(XY)=E(X3)=0E(XY) = E(X^3) = 0 (the odd-order moments of the standard normal distribution are 0)
  3. Covariance: Cov(X,Y)=E(XY)−E(X)E(Y)=0−0=0\text{Cov}(X, Y) = E(XY) - E(X)E(Y) = 0 - 0 = 0
  4. Correlation coefficient: ρXY=Cov(X,Y)D(X)D(Y)=0\rho_{XY} = \frac{\text{Cov}(X,Y)}{\sqrt{D(X)}\sqrt{D(Y)}} = 0
  5. Uncorrelated but not independent: since Y=X2Y = X^2, XX and YY have a determinate functional relationship, and so they are clearly not independent.

Answer: The covariance is 0, the correlation coefficient is 0, and XX and YY are uncorrelated but not independent.

III. The Law of Large Numbers and the Central Limit Theorem

Problem 5

An insurance company has 10000 people insured, each paying 12 yuan a year in premiums. The probability that a person dies within a year is 0.006, and on death their family may claim 1000 yuan from the company. Use the central limit theorem to find the probability that the company’s profit over the year is at least 60000 yuan.

the central limit theoremthe binomial distributionnormal approximationthe insurance problem

Approach:

Translate “a profit of at least 60000 yuan” into an inequality on the number of deaths, apply the normal approximation to the binomial distribution for the number of deaths (the central limit theorem), and then use the normal distribution to compute the required probability.

Steps:

  1. Let XX be the number of deaths in the year, so X∼B(10000,0.006)X \sim B(10000, 0.006)
  2. E(X)=np=10000×0.006=60E(X) = np = 10000 \times 0.006 = 60
  3. D(X)=np(1−p)=60×0.994=59.64D(X) = np(1-p) = 60 \times 0.994 = 59.64, and σ=59.64≈7.723\sigma = \sqrt{59.64} \approx 7.723
  4. Profit = income − payouts = 10000×12−1000X=120000−1000X10000 \times 12 - 1000X = 120000 - 1000X
  5. A profit of at least 60000 yuan: 120000−1000X≥60000120000 - 1000X \geq 60000, that is, X≤60X \leq 60
  6. By the central limit theorem, XX is approximately N(60,59.64)N(60, 59.64)
  7. P(X≤60)≈Φ(60−607.723)=Φ(0)=0.5P(X \leq 60) \approx \Phi(\frac{60-60}{7.723}) = \Phi(0) = 0.5

Answer: The probability that the company’s profit is at least 60000 yuan is approximately 0.50.5.

IV. Parameter Estimation

Problem 6

The probability density of the population XX is f(x)={θxθ−1,0<x<10,otherwisef(x) = \begin{cases} \theta x^{\theta-1}, & 0 < x < 1 \\ 0, & \text{otherwise} \end{cases}, where θ>0\theta > 0 is an unknown parameter, and X1,X2,…,XnX_1, X_2, \ldots, X_n is a sample from XX. Find the method-of-moments estimator and the maximum likelihood estimator of θ\theta.

method of momentsmaximum likelihood estimationparameter estimationa continuous population

Approach:

The method of moments equates the sample moments to the population moments, while the maximum likelihood estimator is obtained by writing out the likelihood function, taking the logarithm, differentiating and solving for the estimator. For both methods you have to write the population density clearly first.

Steps:

  1. Method of moments: E(X)=∫01x⋅θxθ−1dx=θ∫01xθdx=θθ+1E(X) = \int_0^1 x \cdot \theta x^{\theta-1} dx = \theta \int_0^1 x^\theta dx = \frac{\theta}{\theta+1} Setting Xˉ=θθ+1\bar{X} = \frac{\theta}{\theta+1} and solving gives θ^=Xˉ1−Xˉ\hat{\theta} = \frac{\bar{X}}{1-\bar{X}}
  2. Maximum likelihood estimation: The likelihood function is L(θ)=∏i=1nθxiθ−1=θn(∏i=1nxi)θ−1L(\theta) = \prod_{i=1}^n \theta x_i^{\theta-1} = \theta^n (\prod_{i=1}^n x_i)^{\theta-1} The log-likelihood is ln⁡L=nln⁡θ+(θ−1)∑i=1nln⁡xi\ln L = n\ln\theta + (\theta-1)\sum_{i=1}^n \ln x_i Differentiating: dln⁡Ldθ=nθ+∑i=1nln⁡xi=0\frac{d\ln L}{d\theta} = \frac{n}{\theta} + \sum_{i=1}^n \ln x_i = 0 Solving gives θ^=−n∑i=1nln⁡Xi\hat{\theta} = -\frac{n}{\sum_{i=1}^n \ln X_i}

Answer: The method-of-moments estimator is θ^=Xˉ1−Xˉ\hat{\theta} = \frac{\bar{X}}{1-\bar{X}}; the maximum likelihood estimator is θ^=−n∑i=1nln⁡Xi\hat{\theta} = -\frac{n}{\sum_{i=1}^n \ln X_i}.

Problem 7

Let the population X∼N(μ,σ2)X \sim N(\mu, \sigma^2), where both μ\mu and σ2\sigma^2 are unknown. A sample of size 9 is drawn from the population and gives xˉ=10\bar{x} = 10 and s2=4s^2 = 4. Find the confidence interval for μ\mu with confidence level 0.95. (t0.025(8)=2.306t_{0.025}(8) = 2.306)

interval estimationconfidence intervalthe t-distributiona normal population

Approach:

When the population variance is unknown you use the t-distribution: first construct the pivotal quantity, then substitute the sample mean and the sample standard deviation, and use the given t-quantile to compute the confidence interval.

Steps:

  1. Since σ2\sigma^2 is unknown, use the t-distribution: Xˉ−μS/n∼t(n−1)\frac{\bar{X}-\mu}{S/\sqrt{n}} \sim t(n-1)
  2. The confidence level 1−α=0.951-\alpha = 0.95, so α=0.05\alpha = 0.05, and tα/2(n−1)=t0.025(8)=2.306t_{\alpha/2}(n-1) = t_{0.025}(8) = 2.306
  3. The confidence interval is (xˉ−tα/2sn,xˉ+tα/2sn)(\bar{x} - t_{\alpha/2}\frac{s}{\sqrt{n}}, \bar{x} + t_{\alpha/2}\frac{s}{\sqrt{n}})
  4. xˉ=10\bar{x} = 10, s=2s = 2, n=9n = 9, and sn=23\frac{s}{\sqrt{n}} = \frac{2}{3}
  5. The confidence interval is (10−2.306×23,10+2.306×23)=(10−1.537,10+1.537)=(8.463,11.537)(10 - 2.306 \times \frac{2}{3}, 10 + 2.306 \times \frac{2}{3}) = (10 - 1.537, 10 + 1.537) = (8.463, 11.537)

Answer: The confidence interval for μ\mu with confidence level 0.95 is (8.463,11.537)(8.463, 11.537).

V. Hypothesis Testing

Problem 8

The life XX of a certain component made by a factory satisfies X∼N(μ,σ2)X \sim N(\mu, \sigma^2), where both μ\mu and σ2\sigma^2 are unknown. Sixteen items are drawn at random from a batch and the mean life is measured as xˉ=240\bar{x} = 240 hours with sample standard deviation s=8s = 8 hours. At the significance level α=0.05\alpha = 0.05, can it be concluded that the mean life of this batch of components is greater than 235 hours? (t0.05(15)=1.753t_{0.05}(15) = 1.753)

hypothesis testinga one-sided testthe t-testthe mean of a normal population

Approach:

This is a t-test with unknown variance and a one-sided alternative hypothesis: first compute the test statistic, then compare it with the one-sided critical value, and answer accordingly.

Steps:

  1. State the hypotheses: H0:μ≤235H_0: \mu \leq 235, H1:μ>235H_1: \mu > 235 (a right-tailed test)
  2. The test statistic is t=Xˉ−μ0S/n∼t(n−1)t = \frac{\bar{X} - \mu_0}{S/\sqrt{n}} \sim t(n-1) (when H0H_0 holds)
  3. The rejection region is t>tα(n−1)=t0.05(15)=1.753t > t_{\alpha}(n-1) = t_{0.05}(15) = 1.753
  4. Compute the statistic: t=240−2358/16=52=2.5t = \frac{240 - 235}{8/\sqrt{16}} = \frac{5}{2} = 2.5
  5. Since 2.5>1.7532.5 > 1.753, the value falls in the rejection region, so H0H_0 is rejected.

Answer: At the significance level α=0.05\alpha = 0.05, H0H_0 is rejected, and it can be concluded that the mean life of this batch of components is greater than 235 hours.

Problem 9

A machine tool cuts a certain part whose diameter satisfies X∼N(μ,σ2)X \sim N(\mu, \sigma^2). When it is working normally, σ2=0.0482\sigma^2 = 0.048^2. On a certain day 9 parts cut by this machine are sampled and the sample variance is s2=0.0064s^2 = 0.0064. At the significance level α=0.05\alpha = 0.05, is the machine working normally? (χ0.0252(8)=17.535\chi^2_{0.025}(8) = 17.535, χ0.9752(8)=2.180\chi^2_{0.975}(8) = 2.180)

hypothesis testingthe chi-square testtesting a variancethe variance of a normal population

Approach:

This is a chi-square test of the variance of a single normal population: first compute the test statistic, then compare it with the two given chi-square quantiles, and decide whether to reject the hypothesis that the variance equals the normal value.

Steps:

  1. State the hypotheses: H0:σ2=0.0482=0.002304H_0: \sigma^2 = 0.048^2 = 0.002304, H1:σ2≠0.002304H_1: \sigma^2 \neq 0.002304 (a two-sided test)
  2. The test statistic is χ2=(n−1)S2σ02∼χ2(n−1)\chi^2 = \frac{(n-1)S^2}{\sigma_0^2} \sim \chi^2(n-1) (when H0H_0 holds)
  3. The rejection region is χ2<χ1−α/22(n−1)=2.180\chi^2 < \chi^2_{1-\alpha/2}(n-1) = 2.180 or χ2>χα/22(n−1)=17.535\chi^2 > \chi^2_{\alpha/2}(n-1) = 17.535
  4. Compute the statistic: χ2=8×0.00640.002304=0.05120.002304≈22.22\chi^2 = \frac{8 \times 0.0064}{0.002304} = \frac{0.0512}{0.002304} \approx 22.22
  5. Since 22.22>17.53522.22 > 17.535, the value falls in the rejection region, so H0H_0 is rejected.

Answer: At the significance level α=0.05\alpha = 0.05, H0H_0 is rejected, and the machine is judged to be working abnormally — its variance has changed significantly.

Found an issue with this content?

Tell us what could be improved.