Salta al contenuto
Note per Studenti Probability Theory - Mock Exam 3 Report

Probability Theory - Mock Exam 3

Questa pagina non ha ancora la versione ripasso: qui sotto c'è il testo completo.

In questa pagina 7

Mock exam built on the model of the written exams of the equivalent course in Italian (Calcolo delle Probabilità, Information Engineering, UniPD, academic year 2025-26): six exercises with the same points as the full exam of 24 June 2026 (5+4+7+6+6+4 = 32 points), the same mix of computations and short proofs, in the same order of topics. It is a simulation, not an exam given by the course. The exam sheets do not state the duration, so 2 hours is proposed here. Use it with no notes and no calculator: where the text says so, leave fractions, powers and values of Φ\Phi (the distribution function of the standard normal N(0,1)N(0,1)) unevaluated. Compare with the results only at the end, then read the solutions and the grid.

Two differences from the model exam, because of the topics available in the notes of this course: the stochastic process of Exercise 5 is a stationary AR(1) process (the notes do not cover Poisson processes or Markov chains), and the conditional law in Exercise 3 is obtained from independence of jointly gaussian variables (the notes do not state the general conditional-gaussian formula).

Exercise 1 (points 5 = 2+3)

An urn contains 15 balls: 6 red, 4 green and 5 yellow. Four balls are drawn at random without replacement. Let XX be the number of red balls among the four drawn.

(a) Determine the discrete density of XX.

(b) Compute E(X)\mathbb E(X) and the probability that all three colours appear among the four balls drawn.

Leave the results as fractions, without doing the numerical divisions.

Show the result

(a) X={0,1,2,3,4}\mathcal X=\{0,1,2,3,4\} and pX(k)=(6k)(94−k)(154)p_X(k)=\dfrac{\binom6k\binom9{4-k}}{\binom{15}4}, that is pX(0)=665,pX(1)=2465,pX(2)=3691,pX(3)=1291,pX(4)=191.p_X(0)=\frac6{65},\quad p_X(1)=\frac{24}{65},\quad p_X(2)=\frac{36}{91},\quad p_X(3)=\frac{12}{91},\quad p_X(4)=\frac1{91}.

(b) E(X)=85\mathbb E(X)=\dfrac85; P(all three colours)=7201365=4891\mathbb P(\text{all three colours})=\dfrac{720}{1365}=\dfrac{48}{91}.

Show the full solution

(a) Drawing 4 balls without replacement and without caring about the order means choosing a subset of 4 balls out of 15, all subsets being equally likely (see Sampling and Allocation ProblemsCounting problems are modelled either as drawing balls from an urn (sampling) or as placing tokens into cells (allocation), leading to dispositions with and without repetition, permutations and combinations without repetition.Sampling and Allocation Problems → and Empirical and Equiprobable MeasuresProbability theory does not say how to choose P; two common choices are the empirical measure built from repeated trials and, on a finite sample space, the equiprobable measure P(E) = favourable cases over all cases.Empirical and Equiprobable Measures →). The number of possible samples is (154)=15⋅14⋅13⋅124!=1365.\binom{15}4=\frac{15\cdot14\cdot13\cdot12}{4!}=1365 . The sample has exactly kk red balls when we choose kk of the 6 red ones and 4−k4-k of the 99 non-red ones (green or yellow together): by the multiplication rule of Counting PrinciplesCounting finite sets rests on the addition principle for disjoint sets and the multiplication principle for staged procedures, which requires a constant number of outcomes at each stage and distinct composite outcomes.Counting Principles → there are (6k)(94−k)\binom6k\binom9{4-k} such samples. Hence, for k=0,…,4k=0,\dots,4 (this is the hypergeometric density of Bernoulli, Uniform and Binomial Random VariablesBernoulli, discrete uniform and binomial random variables are the basic families with finite alphabet; the binomial counts successes in n independent identical trials, and when independence or constant probability fails (urns without replacement) the hypergeometric density appears instead.Bernoulli, Uniform and Binomial Random Variables →):

kk number of samples pX(k)p_X(k)
0 (60)(94)=126\binom60\binom94=126 1261365=665\frac{126}{1365}=\frac6{65}
1 (61)(93)=6⋅84=504\binom61\binom93=6\cdot84=504 5041365=2465\frac{504}{1365}=\frac{24}{65}
2 (62)(92)=15⋅36=540\binom62\binom92=15\cdot36=540 5401365=3691\frac{540}{1365}=\frac{36}{91}
3 (63)(91)=20⋅9=180\binom63\binom91=20\cdot9=180 1801365=1291\frac{180}{1365}=\frac{12}{91}
4 (64)(90)=15\binom64\binom90=15 151365=191\frac{15}{1365}=\frac1{91}

Check: 126+504+540+180+15=1365126+504+540+180+15=1365, so the probabilities add up to 1. Typical error: using Bin(4,25)\text{Bin}(4,\frac25). The four draws are not independent (the composition of the urn changes after each draw), and the binomial would give pX(0)=(35)4=81625≠665p_X(0)=\big(\frac35\big)^4=\frac{81}{625}\ne\frac6{65}.

(b) Write X=I1+I2+I3+I4X=I_1+I_2+I_3+I_4, where Ii=1I_i=1 if the ii-th ball drawn is red and 00 otherwise. By symmetry every position has the same probability of being red, P(Ii=1)=615=25\mathbb P(I_i=1)=\frac6{15}=\frac25 (the first ball is red with probability 615\frac6{15}, and in the same way the ii-th: nothing distinguishes the positions). By linearity of the expected value (Expected ValueThe expected value E(X) is the sum of the values of a discrete random variable weighted by their probabilities; it is linear, lies between the smallest and the largest value, and equals the barycenter of the density.Expected Value →), which does not need independence, E(X)=4⋅25=85.\mathbb E(X)=4\cdot\frac25=\frac85 . As a check, the definition gives E(X)=0⋅126+1⋅504+2⋅540+3⋅180+4⋅151365=21841365=85\mathbb E(X)=\frac{0\cdot126+1\cdot504+2\cdot540+3\cdot180+4\cdot15}{1365}=\frac{2184}{1365}=\frac85.

For the colours: we draw 4 balls and there are 3 colours, so all colours appear exactly when one colour appears twice and the other two once each. Three disjoint cases:

  • two red, one green, one yellow: (62)⋅4⋅5=15⋅20=300\binom62\cdot4\cdot5=15\cdot20=300;
  • two green, one red, one yellow: (42)⋅6⋅5=6⋅30=180\binom42\cdot6\cdot5=6\cdot30=180;
  • two yellow, one red, one green: (52)⋅6⋅4=10⋅24=240\binom52\cdot6\cdot4=10\cdot24=240.

The total is 300+180+240=720300+180+240=720, hence P(all three colours)=7201365=4891.\mathbb P(\text{all three colours})=\frac{720}{1365}=\frac{48}{91}. Typical errors: forgetting one of the three cases; counting ordered sequences in the numerator but unordered samples in the denominator.

Exercise 2 (points 4 = 2+2)

Let X∼N(0,1)X\sim N(0,1) and Y=e2XY=e^{2X}.

(a) Determine the distribution function and the density of YY, and compute P(Y>e2)\mathbb P(Y>e^2).

(b) Compute E(Y)\mathbb E(Y) and Var⁡(Y)\operatorname{Var}(Y).

Show the result

(a) FY(y)=Φ ⁣(ln⁡y2)F_Y(y)=\Phi\!\big(\tfrac{\ln y}2\big) for y>0y>0 and FY(y)=0F_Y(y)=0 for y≤0y\le0; fY(y)=12y2π e−(ln⁡y)2/8 1(0,∞)(y)f_Y(y)=\dfrac1{2y\sqrt{2\pi}}\,e^{-(\ln y)^2/8}\,\mathbf 1_{(0,\infty)}(y); P(Y>e2)=1−Φ(1)\mathbb P(Y>e^2)=1-\Phi(1).

(b) E(Y)=e2\mathbb E(Y)=e^2, Var⁡(Y)=e8−e4\operatorname{Var}(Y)=e^8-e^4.

Show the full solution

(a) We use the method of the distribution function (Functions of a Random VariableTo find the distribution of Y = g(X) one computes the distribution function of Y first (always works, also for mixed results) or, for piecewise invertible g and absolutely continuous X, uses the density formula with the sum of f_X(a) divided by the absolute value of g'(a) over the preimages.Functions of a Random Variable →). Since e2X>0e^{2X}>0, we have FY(y)=0F_Y(y)=0 for y≤0y\le0. For y>0y>0, the function x↦e2xx\mapsto e^{2x} is strictly increasing, so FY(y)=P(e2X≤y)=P(X≤ln⁡y2)=Φ(ln⁡y2).F_Y(y)=\mathbb P(e^{2X}\le y)=\mathbb P\Big(X\le\frac{\ln y}2\Big)=\Phi\Big(\frac{\ln y}2\Big). Differentiating, with Φ′=φ\Phi'=\varphi and the chain rule, fY(y)=φ(ln⁡y2)⋅12y=12y2πexp⁡(−(ln⁡y)28),y>0.f_Y(y)=\varphi\Big(\frac{\ln y}2\Big)\cdot\frac1{2y}=\frac1{2y\sqrt{2\pi}}\exp\Big(-\frac{(\ln y)^2}8\Big),\qquad y>0 . The event {Y>e2}\{Y>e^2\} is {2X>2}={X>1}\{2X>2\}=\{X>1\}, so P(Y>e2)=1−Φ(1)\mathbb P(Y>e^2)=1-\Phi(1). Typical error: forgetting the factor 12\frac12 coming from the derivative of ln⁡y2\frac{\ln y}2, or the factor 1y\frac1y.

(b) It is much simpler to use Functions of Random Variables and LOTUSA function g(X) of a discrete random variable is again a discrete random variable whose density is obtained by summing p_X over the preimage, and the LOTUS computes E(g(X)) directly from p_X without finding the density of g(X).Functions of Random Variables and LOTUS → than to integrate yfY(y)y f_Y(y): E(Y)=E(e2X)=∫−∞+∞e2xe−x2/22π dx.\mathbb E(Y)=\mathbb E(e^{2X})=\int_{-\infty}^{+\infty}e^{2x}\frac{e^{-x^2/2}}{\sqrt{2\pi}}\,dx . Complete the square in the exponent: 2x−x22=−(x−2)22+22x-\frac{x^2}2=-\frac{(x-2)^2}2+2. Then E(Y)=e2∫−∞+∞e−(x−2)2/22π dx=e2,\mathbb E(Y)=e^2\int_{-\infty}^{+\infty}\frac{e^{-(x-2)^2/2}}{\sqrt{2\pi}}\,dx=e^2, because the last integrand is the density of N(2,1)N(2,1), whose integral is 1. In the same way, Y2=e4XY^2=e^{4X} and 4x−x22=−(x−4)22+84x-\frac{x^2}2=-\frac{(x-4)^2}2+8, so E(Y2)=e8\mathbb E(Y^2)=e^8. By the formula for the VarianceThe variance is the expected squared deviation from the expected value and measures how spread out a random variable is; it is non-negative, zero only for constants, scales with the square of a multiplier, ignores shifts, and equals E(X^2) minus the square of E(X).Variance →, Var⁡(Y)=E(Y2)−E(Y)2=e8−e4=e4 (e4−1).\operatorname{Var}(Y)=\mathbb E(Y^2)-\mathbb E(Y)^2=e^8-e^4=e^4\,(e^4-1). Typical error: writing E(e2X)=e2E(X)=1\mathbb E(e^{2X})=e^{2\mathbb E(X)}=1. In general E(g(X))≠g(E(X))\mathbb E(g(X))\ne g(\mathbb E(X)).

Exercise 3 (points 7 = 2+2+3)

Let (X,Y)(X,Y) be a gaussian random vector with mean m=(1,−1)\mathbf m=(1,-1) and covariance matrix Σ=(4−2−25).\Sigma=\begin{pmatrix}4&-2\\-2&5\end{pmatrix}. (a) Write the joint density of (X,Y)(X,Y) and compute the correlation coefficient ρ(X,Y)\rho(X,Y).

(b) Determine the law of U:=X+2YU:=X+2Y and compute P(U>7)\mathbb P(U>7).

(c) Show that XX and UU are independent. Using this, determine the conditional law of YY given X=xX=x and compute P(Y>0∣X=3)\mathbb P(Y>0\mid X=3).

Leave the values of Φ\Phi unevaluated.

Show the result

(a) fX,Y(x,y)=18πexp⁡{−132(5u2+4uv+4v2)}f_{X,Y}(x,y)=\dfrac1{8\pi}\exp\Big\{-\dfrac1{32}\big(5u^2+4uv+4v^2\big)\Big\} with u=x−1u=x-1, v=y+1v=y+1; ρ(X,Y)=−15\rho(X,Y)=-\dfrac1{\sqrt5}.

(b) U∼N(−1,16)U\sim N(-1,16); P(U>7)=1−Φ(2)\mathbb P(U>7)=1-\Phi(2).

(c) Cov⁡(X,U)=0\operatorname{Cov}(X,U)=0, so XX and UU are independent. Y∣X=x∼N(−1+x2, 4)Y\mid X=x\sim N\big(-\tfrac{1+x}2,\,4\big) and P(Y>0∣X=3)=1−Φ(1)\mathbb P(Y>0\mid X=3)=1-\Phi(1).

Show the full solution

(a) From Gaussian Random Vectorsa gaussian vector is defined as an affine transformation of a vector of i.i.d. standard normals, so it is identified by its mean vector and covariance matrix, has a density only when the covariance matrix is invertible, stays gaussian under affine maps, and has independent components exactly when they are uncorrelated.Gaussian Random Vectors →: the density exists because Σ\Sigma is invertible. Here det⁡Σ=4⋅5−(−2)2=16\det\Sigma=4\cdot5-(-2)^2=16 and Σ−1=116(5224).\Sigma^{-1}=\frac1{16}\begin{pmatrix}5&2\\2&4\end{pmatrix}. (Swap the diagonal entries, change the sign of the off-diagonal ones, divide by the determinant.) With u=x−1u=x-1, v=y+1v=y+1 the density is fX,Y(x,y)=12πdet⁡Σexp⁡{−12(u,v) Σ−1(uv)}=18πexp⁡{−132(5u2+4uv+4v2)},(x,y)∈R2.f_{X,Y}(x,y)=\frac1{2\pi\sqrt{\det\Sigma}}\exp\Big\{-\frac12(u,v)\,\Sigma^{-1}\binom uv\Big\}=\frac1{8\pi}\exp\Big\{-\frac1{32}\big(5u^2+4uv+4v^2\big)\Big\},\quad(x,y)\in\mathbb R^2 . The correlation coefficient (Covariance and CorrelationThe variance of a sum X + Y equals var(X) + var(Y) + 2 cov(X,Y), where the covariance E((X - E(X))(Y - E(Y))) cannot be computed from the two marginal laws alone, which motivates the study of random vectors and joint behaviour.Covariance and Correlation →) is ρ(X,Y)=Cov⁡(X,Y)Var⁡(X)Var⁡(Y)=−24⋅5=−15.\rho(X,Y)=\frac{\operatorname{Cov}(X,Y)}{\sqrt{\operatorname{Var}(X)\operatorname{Var}(Y)}}=\frac{-2}{\sqrt{4\cdot5}}=-\frac1{\sqrt5}. Typical error: putting Σ\Sigma instead of Σ−1\Sigma^{-1} in the exponent, or forgetting that the normalizing constant uses det⁡Σ\sqrt{\det\Sigma}, not det⁡Σ\det\Sigma.

(b) A linear combination of the components of a gaussian vector is gaussian (affine transformations, Gaussian Random Vectorsa gaussian vector is defined as an affine transformation of a vector of i.i.d. standard normals, so it is identified by its mean vector and covariance matrix, has a density only when the covariance matrix is invertible, stays gaussian under affine maps, and has independent components exactly when they are uncorrelated.Gaussian Random Vectors →), so UU is gaussian and we only need its mean and variance (Mean Vector and Covariance MatrixFor a column random vector X the mean vector collects the expectations of the components, the correlation matrix R = E(X X^T) and the covariance matrix Sigma = E((X - mu)(X - mu)^T) = R - mu mu^T are symmetric positive semidefinite, and under Y = A X + b they transform as mu_Y = A mu_X + b and Sigma_Y = A Sigma_X A^T.Mean Vector and Covariance Matrix →): E(U)=E(X)+2 E(Y)=1−2=−1,\mathbb E(U)=\mathbb E(X)+2\,\mathbb E(Y)=1-2=-1, Var⁡(U)=Var⁡(X)+4Var⁡(Y)+4Cov⁡(X,Y)=4+20−8=16.\operatorname{Var}(U)=\operatorname{Var}(X)+4\operatorname{Var}(Y)+4\operatorname{Cov}(X,Y)=4+20-8=16 . So U∼N(−1,16)U\sim N(-1,16). Standardizing, with Z∼N(0,1)Z\sim N(0,1) and standard deviation 44, P(U>7)=P(Z>7−(−1)4)=P(Z>2)=1−Φ(2).\mathbb P(U>7)=\mathbb P\Big(Z>\frac{7-(-1)}4\Big)=\mathbb P(Z>2)=1-\Phi(2). Typical error: forgetting the covariance term, or using the variance 1616 instead of the standard deviation 44 when standardizing.

(c) The covariance is Cov⁡(X,U)=Cov⁡(X,X+2Y)=Var⁡(X)+2Cov⁡(X,Y)=4−4=0.\operatorname{Cov}(X,U)=\operatorname{Cov}(X,X+2Y)=\operatorname{Var}(X)+2\operatorname{Cov}(X,Y)=4-4=0 . The vector (X,U)(X,U) is a linear transformation of (X,Y)(X,Y), hence it is a gaussian vector; its components are uncorrelated, therefore they are independent (equivalence of uncorrelation and independence for gaussian vectors, in Gaussian Random Vectorsa gaussian vector is defined as an affine transformation of a vector of i.i.d. standard normals, so it is identified by its mean vector and covariance matrix, has a density only when the covariance matrix is invertible, stays gaussian under affine maps, and has independent components exactly when they are uncorrelated.Gaussian Random Vectors →). Warning: this needs (X,U)(X,U) to be jointly gaussian, not only each of them gaussian.

Now Y=U−X2Y=\frac{U-X}2. Fix X=xX=x. Since UU is independent of XX, conditioning on {X=x}\{X=x\} does not change the law of UU (see Independent Random VariablesDiscrete random variables X and Y are independent when the joint density factorizes as p_XY = p_X p_Y for all pairs; independence is preserved by functions f(X), g(Y), implies E(XY) = E(X)E(Y) and var(X + Y) = var(X) + var(Y), but uncorrelated does not imply independent.Independent Random Variables → and Conditional Distributions of Random VariablesConditioning re-evaluates the distribution function or density of a random variable given an event E, which may be unrelated to X, defined through X itself, or defined through another random variable Y; for discrete vectors the conditional density is p_XY over p_Y, giving mixtures, the memoryless property of the geometric law and Bayes formula.Conditional Distributions of Random Variables →); hence, given X=xX=x, Y=U−x2with U∼N(−1,16),soY∣X=x ∼ N(−1−x2, 164)=N(−1+x2, 4).Y=\frac{U-x}2\quad\text{with }U\sim N(-1,16),\qquad\text{so}\qquad Y\mid X=x\ \sim\ N\Big(\frac{-1-x}2,\ \frac{16}4\Big)=N\Big(-\frac{1+x}2,\ 4\Big). In particular E(Y∣X)=−1+X2\mathbb E(Y\mid X)=-\frac{1+X}2 (Conditional Expectationthe conditional expected value E(X given Y=y) is the mean of X under the conditional density, and the law of the iterated expectation E(g(X)) = E(E(g(X) given Y)) turns hard expectations into two easy steps, as in random sums.Conditional Expectation →), and the conditional variance 44 is smaller than Var⁡(Y)=5\operatorname{Var}(Y)=5, because knowing XX gives information on YY. For x=3x=3 the conditional law is N(−2,4)N(-2,4) with standard deviation 2, so P(Y>0∣X=3)=P(Z>0−(−2)2)=1−Φ(1).\mathbb P(Y>0\mid X=3)=\mathbb P\Big(Z>\frac{0-(-2)}2\Big)=1-\Phi(1). Typical error: answering P(Y>0)=1−Φ(15)\mathbb P(Y>0)=1-\Phi\big(\tfrac1{\sqrt5}\big), which ignores the information X=3X=3; XX and YY are correlated, not independent.

Exercise 4 (points 6 = 2+2+2)

Let ω\omega be a random number uniformly distributed in [0,1][0,1] (that is, the sample space is Ω=[0,1]\Omega=[0,1] with the length as probability) and, for n≥1n\ge1, let Yn(ω)=n ωn.Y_n(\omega)=n\,\omega^n . (a) Show that Yn→0Y_n\to0 in probability and in distribution.

(b) Show that Yn→0Y_n\to0 almost surely, that is, Yn(ω)→0Y_n(\omega)\to0 for every ω\omega outside a set of probability 00.

(c) Compute E(Yn)\mathbb E(Y_n) and E(Yn2)\mathbb E(Y_n^2). Does YnY_n converge to 00 in L1L^1? And in L2L^2?

Show the result

(a) For every ε>0\varepsilon>0: P(∣Yn∣>ε)=1−(ε/n)1/n→0\mathbb P(|Y_n|>\varepsilon)=1-(\varepsilon/n)^{1/n}\to0 (for n>εn>\varepsilon), so Yn→P0Y_n\xrightarrow{P}0, hence also Yn→D0Y_n\xrightarrow{\mathcal D}0.

(b) Yn(ω)→0Y_n(\omega)\to0 for every ω∈[0,1)\omega\in[0,1), and P(ω=1)=0\mathbb P(\omega=1)=0: almost sure convergence to 00.

(c) E(Yn)=nn+1→1≠0\mathbb E(Y_n)=\dfrac n{n+1}\to1\ne0 and E(Yn2)=n22n+1→+∞\mathbb E(Y_n^2)=\dfrac{n^2}{2n+1}\to+\infty: no convergence in L1L^1, no convergence in L2L^2.

Show the full solution

See Modes of Convergencea random sequence can converge pointwise (almost surely), in distribution, in probability or in the mean of order p; the notes define the last three, relate them (L2 implies L1 implies probability implies distribution), use Levy's theorem with characteristic functions, and show with counterexamples what convergence in distribution or in probability does not guarantee.Modes of Convergence → for the definitions.

(a) Since Yn≥0Y_n\ge0, for ε>0\varepsilon>0 and n>εn>\varepsilon: P(∣Yn∣>ε)=P(nωn>ε)=P(ω>(εn)1/n)=1−(εn)1/n,\mathbb P(|Y_n|>\varepsilon)=\mathbb P(n\omega^n>\varepsilon)=\mathbb P\Big(\omega>\big(\tfrac\varepsilon n\big)^{1/n}\Big)=1-\Big(\frac\varepsilon n\Big)^{1/n}, because ω\omega is uniform on [0,1][0,1] and the threshold (ε/n)1/n(\varepsilon/n)^{1/n} lies in (0,1)(0,1) (for n>εn>\varepsilon). Now (εn)1/n=exp⁡(ln⁡ε−ln⁡nn)→n→∞e0=1,\Big(\frac\varepsilon n\Big)^{1/n}=\exp\Big(\frac{\ln\varepsilon-\ln n}n\Big)\xrightarrow[n\to\infty]{}e^0=1, since ln⁡nn→0\frac{\ln n}n\to0. Therefore P(∣Yn∣>ε)→0\mathbb P(|Y_n|>\varepsilon)\to0 for all ε>0\varepsilon>0, i.e. Yn→P0Y_n\xrightarrow{P}0. Convergence in probability implies convergence in distribution (here, to the constant 00): the distribution functions FnF_n satisfy Fn(x)=0F_n(x)=0 for x<0x<0 and, for x>0x>0, Fn(x)=1−P(Yn>x)→1F_n(x)=1-\mathbb P(Y_n>x)\to1; this is the distribution function of the constant 00 at every point x≠0x\ne0, its continuity points.

(b) Fix ω∈[0,1)\omega\in[0,1). If ω=0\omega=0, Yn(ω)=0Y_n(\omega)=0 for all nn. If 0<ω<10<\omega<1, the ratio of consecutive terms is Yn+1(ω)Yn(ω)=(n+1) ωn+1n ωn=(1+1n)ω→n→∞ω<1,\frac{Y_{n+1}(\omega)}{Y_n(\omega)}=\frac{(n+1)\,\omega^{n+1}}{n\,\omega^n}=\Big(1+\frac1n\Big)\omega\xrightarrow[n\to\infty]{}\omega<1, so from some nn on the sequence decreases at least geometrically and tends to 00 (equivalently, the exponential ωn\omega^n beats the polynomial nn). The only point where convergence fails is ω=1\omega=1, where Yn(1)=n→∞Y_n(1)=n\to\infty; but P({1})=0\mathbb P(\{1\})=0. Hence Yn→0Y_n\to0 almost surely. A numerical illustration for ω=0.9\omega=0.9: YnY_n is 0.90.9, 2.952.95, 3.493.49, 0.260.26, 0.0030.003 for n=1,5,10,50,100n=1,5,10,50,100: it first grows and then collapses.

(c) By the fundamental theorem for the expected value (Expected ValueThe expected value E(X) is the sum of the values of a discrete random variable weighted by their probabilities; it is linear, lies between the smallest and the largest value, and equals the barycenter of the density.Expected Value →), E(Yn)=∫01n ωn dω=nn+1→1,E(Yn2)=∫01n2ω2n dω=n22n+1→+∞.\mathbb E(Y_n)=\int_0^1n\,\omega^n\,d\omega=\frac n{n+1}\to1,\qquad\mathbb E(Y_n^2)=\int_0^1n^2\omega^{2n}\,d\omega=\frac{n^2}{2n+1}\to+\infty . If Yn→0Y_n\to0 in L1L^1 we would have E(Yn)→E(0)=0\mathbb E(Y_n)\to\mathbb E(0)=0 (convergence in L1L^1 implies convergence of the means); but E(Yn)→1\mathbb E(Y_n)\to1. So there is no convergence in L1L^1, and therefore none in L2L^2 either (since L2⇒L1L^2\Rightarrow L^1; indeed E(Yn2)→∞\mathbb E(Y_n^2)\to\infty). Conclusion: almost sure convergence (and convergence in probability) does not imply convergence in the mean. The mass of YnY_n does not disappear: it is concentrated on the shrinking set where ω\omega is close to 11, but there YnY_n is huge. Typical error: concluding E(Yn)→0\mathbb E(Y_n)\to0 because "Yn→0Y_n\to0".

Exercise 5 (points 6 = 2+2+2)

Let (Wn)n≥0(W_n)_{n\ge0} be white gaussian noise of intensity 33, i.e. independent random variables Wn∼N(0,3)W_n\sim N(0,3), and let X0∼N(0,σ02)X_0\sim N(0,\sigma_0^2) be independent of (Wn)(W_n). Define the process Xn+1=12 Xn+Wn,n≥0.X_{n+1}=\tfrac12\,X_n+W_n,\qquad n\ge0 . (a) For which value of σ02\sigma_0^2 is (Xn)n≥0(X_n)_{n\ge0} weakly stationary? For that value, compute the mean and the autocorrelation function rX(k)r_X(k).

(b) With the value of σ02\sigma_0^2 found in (a), determine the law of D=X2−X1D=X_2-X_1 and compute P(D>2)\mathbb P(D>2).

(c) Write the covariance matrix of (X0,X1,X2)(X_0,X_1,X_2). Show that X1X_1 and V:=X2−12X1V:=X_2-\tfrac12X_1 are independent and determine the law of VV.

Leave the values of Φ\Phi unevaluated.

Show the result

(a) σ02=4\sigma_0^2=4; then mX(n)=0m_X(n)=0 and rX(k)=4 (12)∣k∣r_X(k)=4\,\big(\tfrac12\big)^{|k|}, i.e. rX(0)=4r_X(0)=4, rX(±1)=2r_X(\pm1)=2, rX(±2)=1r_X(\pm2)=1.

(b) D∼N(0,4)D\sim N(0,4); P(D>2)=1−Φ(1)\mathbb P(D>2)=1-\Phi(1).

(c) (421242124)\begin{pmatrix}4&2&1\\2&4&2\\1&2&4\end{pmatrix}; Cov⁡(X1,V)=0\operatorname{Cov}(X_1,V)=0 and (X1,V)(X_1,V) is gaussian, so independent; V∼N(0,3)V\sim N(0,3).

Show the full solution

(a) This is the AR(1) process of Basic Discrete-Time Processesfour standard discrete time second order processes built from white Gaussian noise (white noise itself, the Gaussian random walk, the moving average MA(1) and the autoregressive AR(1)) with their mean, autocorrelation and stationarity, followed by the effect of LTI filtering.Basic Discrete-Time Processes → with a=12a=\frac12 and σ2=3\sigma^2=3. By induction XnX_n is a linear combination of X0,W0,…,Wn−1X_0,W_0,\dots,W_{n-1}, which all have zero mean, so mX(n)=0m_X(n)=0 for all nn. Also XnX_n is independent of WnW_n and of the future noise. Squaring the recursion, σX2(n+1)=E(Xn+12)=14 σX2(n)+2⋅12E(XnWn)⏟=0+3=14 σX2(n)+3,σX2(0)=σ02.\sigma_X^2(n+1)=\mathbb E(X_{n+1}^2)=\tfrac14\,\sigma_X^2(n)+2\cdot\tfrac12\underbrace{\mathbb E(X_nW_n)}_{=0}+3=\tfrac14\,\sigma_X^2(n)+3,\qquad\sigma_X^2(0)=\sigma_0^2 . The constant solution satisfies s=14s+3s=\frac14s+3, i.e. s=4s=4. Subtracting, σX2(n+1)−4=14(σX2(n)−4)\sigma_X^2(n+1)-4=\frac14\big(\sigma_X^2(n)-4\big), so σX2(n)=4+σ02−44n.\sigma_X^2(n)=4+\frac{\sigma_0^2-4}{4^n}. If σ02≠4\sigma_0^2\ne4, then E(Xn2)=σX2(n)\mathbb E(X_n^2)=\sigma_X^2(n) depends on nn and the process is not weakly stationary (Weakly Stationary Processesa second order process is weakly stationary when its mean is constant and its autocorrelation depends only on the time difference; this note gives the equivalent conditions, consequences, symmetry of the autocorrelation, an example and the Toeplitz structure of covariance matrices.Weakly Stationary Processes →: MX(n)=rX(n,n)M_X(n)=r_X(n,n) must be constant). If σ02=4=σ21−a2\sigma_0^2=4=\frac{\sigma^2}{1-a^2}, the mean is constant, the variance is constant, and the lemma of the notes gives rX(n+k,n)=σ21−a2 a∣k∣=4(12)∣k∣,r_X(n+k,n)=\frac{\sigma^2}{1-a^2}\,a^{|k|}=4\Big(\frac12\Big)^{|k|}, which does not depend on nn: the process is weakly stationary. Explicitly rX(1)=E(Xn+1Xn)=12E(Xn2)=2r_X(1)=\mathbb E(X_{n+1}X_n)=\frac12\mathbb E(X_n^2)=2 and rX(2)=12rX(1)=1r_X(2)=\frac12r_X(1)=1. Typical error: using rX(k)=σ02a∣k∣r_X(k)=\sigma_0^2a^{|k|} without checking σ02=σ21−a2\sigma_0^2=\frac{\sigma^2}{1-a^2}, or writing aka^k instead of a∣k∣a^{|k|} for negative lags.

(b) The vector (X1,X2)(X_1,X_2) is a linear function of the independent gaussians (X0,W0,W1)(X_0,W_0,W_1), so it is a gaussian vector and D=X2−X1D=X_2-X_1 is gaussian with mean 00 and, using stationarity, Var⁡(D)=rX(0)+rX(0)−2 rX(1)=4+4−4=4.\operatorname{Var}(D)=r_X(0)+r_X(0)-2\,r_X(1)=4+4-4=4 . Hence D∼N(0,4)D\sim N(0,4) and, with standard deviation 2, P(D>2)=P(Z>1)=1−Φ(1).\mathbb P(D>2)=\mathbb P(Z>1)=1-\Phi(1). Check: D=W1−12X1D=W_1-\frac12X_1 with W1W_1 independent of X1X_1, so Var⁡(D)=3+14⋅4=4\operatorname{Var}(D)=3+\frac14\cdot4=4. Typical error: forgetting the term −2 rX(1)-2\,r_X(1), i.e. treating X1X_1 and X2X_2 as independent.

(c) For equally spaced times the covariance matrix of a weakly stationary process is Toeplitz, [rX(i−j)][r_X(i-j)] (see Weakly Stationary Processesa second order process is weakly stationary when its mean is constant and its autocorrelation depends only on the time difference; this note gives the equivalent conditions, consequences, symmetry of the autocorrelation, an example and the Toeplitz structure of covariance matrices.Weakly Stationary Processes →), and rX(k)=4⋅2−∣k∣r_X(k)=4\cdot2^{-|k|}: R=(rX(0)rX(1)rX(2)rX(1)rX(0)rX(1)rX(2)rX(1)rX(0))=(421242124).R=\begin{pmatrix}r_X(0)&r_X(1)&r_X(2)\\r_X(1)&r_X(0)&r_X(1)\\r_X(2)&r_X(1)&r_X(0)\end{pmatrix}=\begin{pmatrix}4&2&1\\2&4&2\\1&2&4\end{pmatrix}. The covariance of X1X_1 and V=X2−12X1V=X_2-\frac12X_1 is Cov⁡(X1,V)=E(X1X2)−12E(X12)=rX(1)−12rX(0)=2−2=0.\operatorname{Cov}(X_1,V)=\mathbb E(X_1X_2)-\tfrac12\mathbb E(X_1^2)=r_X(1)-\tfrac12r_X(0)=2-2=0 . The pair (X1,V)(X_1,V) is a linear transformation of the gaussian vector (X1,X2)(X_1,X_2), so it is gaussian; being uncorrelated, X1X_1 and VV are independent. The law of VV: gaussian with mean 00 and Var⁡(V)=rX(0)+14rX(0)−2⋅12 rX(1)=4+1−2=3.\operatorname{Var}(V)=r_X(0)+\tfrac14r_X(0)-2\cdot\tfrac12\,r_X(1)=4+1-2=3 . So V∼N(0,3)V\sim N(0,3). This is no accident: V=X2−12X1=W1V=X_2-\frac12X_1=W_1 is the noise, and the recursion says that the new noise is independent of the past.

Exercise 6 (points 4 = 2+2)

(a) Let XX be a random variable with density ff and X≥0X\ge0. Prove that E(X)=∫0+∞P(X>t) dt.\mathbb E(X)=\int_0^{+\infty}\mathbb P(X>t)\,dt . (b) Let X≥0X\ge0 be a random variable with P(X>t)=(1+t)−3\mathbb P(X>t)=(1+t)^{-3} for all t≥0t\ge0. Using (a), compute E(X)\mathbb E(X) and, applying (a) to X2X^2, also E(X2)\mathbb E(X^2) and Var⁡(X)\operatorname{Var}(X).

Show the result

(a) Proof: write x=∫0xdtx=\int_0^x dt, exchange the order of integration (non-negative integrand).

(b) E(X)=12\mathbb E(X)=\dfrac12, E(X2)=1\mathbb E(X^2)=1, Var⁡(X)=34\operatorname{Var}(X)=\dfrac34.

Show the full solution

(a) Since X≥0X\ge0, f(x)=0f(x)=0 for x<0x<0 and E(X)=∫0+∞x f(x) dx.\mathbb E(X)=\int_0^{+\infty}x\,f(x)\,dx . Write x=∫0xdt=∫0+∞1{t<x} dtx=\int_0^x dt=\int_0^{+\infty}\mathbf 1_{\{t<x\}}\,dt and substitute: E(X)=∫0+∞(∫0+∞1{t<x} dt)f(x) dx=∫0+∞(∫0+∞1{t<x} f(x) dx)dt=∫0+∞(∫t+∞f(x) dx)dt.\mathbb E(X)=\int_0^{+\infty}\Big(\int_0^{+\infty}\mathbf 1_{\{t<x\}}\,dt\Big)f(x)\,dx=\int_0^{+\infty}\Big(\int_0^{+\infty}\mathbf 1_{\{t<x\}}\,f(x)\,dx\Big)dt=\int_0^{+\infty}\Big(\int_t^{+\infty}f(x)\,dx\Big)dt . The exchange of the two integrals is allowed because the integrand 1{t<x}f(x)\mathbf 1_{\{t<x\}}f(x) is non-negative (Tonelli's theorem; the order of integration of a non-negative function can be changed). Finally ∫t+∞f(x) dx=P(X>t)\int_t^{+\infty}f(x)\,dx=\mathbb P(X>t), which gives the formula. □\square (See Expected ValueThe expected value E(X) is the sum of the values of a discrete random variable weighted by their probabilities; it is linear, lies between the smallest and the largest value, and equals the barycenter of the density.Expected Value → for the definition used in the first line.) Typical error: exchanging the integrals without changing the limits: for 0≤t<x0\le t<x the inner integral over xx runs from tt to +∞+\infty, not from 00.

(b) By (a), E(X)=∫0+∞(1+t)−3 dt=[−12(1+t)2]0+∞=12.\mathbb E(X)=\int_0^{+\infty}(1+t)^{-3}\,dt=\Big[-\frac1{2(1+t)^2}\Big]_0^{+\infty}=\frac12 . The variable X2X^2 is also non-negative, and P(X2>s)=P(X>s)=(1+s)−3\mathbb P(X^2>s)=\mathbb P(X>\sqrt s)=(1+\sqrt s)^{-3} for s≥0s\ge0. Applying (a) to X2X^2 and substituting s=t2s=t^2 (ds=2t dtds=2t\,dt), E(X2)=∫0+∞(1+s)−3 ds=∫0+∞2t (1+t)−3 dt=2∫0+∞[(1+t)−2−(1+t)−3]dt=2(1−12)=1,\mathbb E(X^2)=\int_0^{+\infty}(1+\sqrt s)^{-3}\,ds=\int_0^{+\infty}2t\,(1+t)^{-3}\,dt=2\int_0^{+\infty}\Big[(1+t)^{-2}-(1+t)^{-3}\Big]dt=2\Big(1-\frac12\Big)=1, where we wrote t=(1+t)−1t=(1+t)-1. Then, by the formula of the VarianceThe variance is the expected squared deviation from the expected value and measures how spread out a random variable is; it is non-negative, zero only for constants, scales with the square of a multiplier, ignores shifts, and equals E(X^2) minus the square of E(X).Variance →, Var⁡(X)=E(X2)−E(X)2=1−14=34.\operatorname{Var}(X)=\mathbb E(X^2)-\mathbb E(X)^2=1-\frac14=\frac34 . Check with the density: f(t)=−ddt(1+t)−3=3(1+t)−4f(t)=-\frac d{dt}(1+t)^{-3}=3(1+t)^{-4}, and ∫0∞t⋅3(1+t)−4dt=12\int_0^\infty t\cdot3(1+t)^{-4}dt=\frac12, ∫0∞t2⋅3(1+t)−4dt=1\int_0^\infty t^2\cdot3(1+t)^{-4}dt=1. Typical error: computing E(X2)\mathbb E(X^2) as ∫0∞P(X>t)2 dt\int_0^\infty\mathbb P(X>t)^2\,dt or as E(X)2\mathbb E(X)^2.

Self-assessment grid
Exercise Points What must be there for full marks Typical errors
1 5 (a) 2: count of samples (154)\binom{15}4 and (6k)(94−k)\binom6k\binom9{4-k}, five probabilities that add to 1. (b) 3: E(X)=85\mathbb E(X)=\frac85 (indicators or the sum), three cases for all colours, 4891\frac{48}{91} Binomial instead of hypergeometric; ordered vs unordered counting; missing one of the three colour cases
2 4 (a) 2: FY(y)=Φ(ln⁡y2)F_Y(y)=\Phi(\frac{\ln y}2) for y>0y>0, density with 12y\frac1{2y}, 1−Φ(1)1-\Phi(1). (b) 2: LOTUS and completing the square, e2e^2, e8−e4e^8-e^4 Factor 12\frac12 or 1y\frac1y lost; E(e2X)=e2E(X)\mathbb E(e^{2X})=e^{2\mathbb E(X)}
3 7 (a) 2: det⁡Σ=16\det\Sigma=16, Σ−1\Sigma^{-1}, density with 18π\frac1{8\pi}, ρ=−15\rho=-\frac1{\sqrt5}. (b) 2: U∼N(−1,16)U\sim N(-1,16), 1−Φ(2)1-\Phi(2). (c) 3: Cov⁡(X,U)=0\operatorname{Cov}(X,U)=0 and jointly gaussian so independent (1); Y∣X=x∼N(−1+x2,4)Y\mid X=x\sim N(-\frac{1+x}2,4) (1); 1−Φ(1)1-\Phi(1) (1) Σ\Sigma in place of Σ−1\Sigma^{-1}; covariance term forgotten; variance instead of standard deviation; uncorrelated without joint gaussianity; P(Y>0)\mathbb P(Y>0) instead of the conditional one
4 6 (a) 2: P(Yn>ε)=1−(ε/n)1/n→0\mathbb P(Y_n>\varepsilon)=1-(\varepsilon/n)^{1/n}\to0, and why distribution follows. (b) 2: pointwise limit on [0,1)[0,1) and the null set {1}\{1\}. (c) 2: nn+1\frac n{n+1}, n22n+1\frac{n^2}{2n+1}, no L1L^1 and no L2L^2 with the right argument Thinking that Yn→0Y_n\to0 forces E(Yn)→0\mathbb E(Y_n)\to0; forgetting the exceptional point ω=1\omega=1
5 6 (a) 2: recursion for the variance, σ02=4\sigma_0^2=4, why other values fail, rX(k)=4⋅2−∣k∣r_X(k)=4\cdot2^{-|k|}. (b) 2: gaussian, variance 44 with the covariance term, 1−Φ(1)1-\Phi(1). (c) 2: Toeplitz matrix; Cov⁡(X1,V)=0\operatorname{Cov}(X_1,V)=0 with joint gaussianity; V∼N(0,3)V\sim N(0,3) aka^k instead of a∣k∣a^{|k|}; forgetting −2rX(1)-2r_X(1); no check of the stationarity condition
6 4 (a) 2: x=∫0xdtx=\int_0^x dt, exchange of integrals justified by non-negativity, correct limits. (b) 2: 12\frac12, E(X2)=1\mathbb E(X^2)=1 via X2X^2, Var⁡=34\operatorname{Var}=\frac34 Wrong limits after the exchange; E(X2)\mathbb E(X^2) computed with P(X>t)2\mathbb P(X>t)^2