Probability Theory - Mock Exam 2
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 papers of Calcolo delle Probabilità (the equivalent course taught in Italian for Information Engineering and Telecommunications, UniPD), in particular the paper of 24 June 2026 and the other papers of the 2025/26 academic year. It is a simulation, not a real paper: situations, functions and numbers are new. Six exercises for 32 points in total (5 + 4 + 7 + 6 + 6 + 4, as in the model). Duration: the model sheets do not state it, so 2 hours is proposed here. No notes, no calculator: leave fractions and expressions such as unevaluated. Every answer must be justified.
Exercise 1 (points 5 = 2+2+1)
Packets are sent in pairs. For each pair a router is chosen at random: router with probability and router with probability , and both packets of the pair go through the chosen router. A packet is lost with probability at and with probability at ; given the router, the two packets are lost independently of each other. Let and be the events "the first packet is lost" and "the second packet is lost".
(a) Compute the probability that exactly one of the two packets of a pair is lost.
(b) Compute and and decide whether and are independent.
(c) Suppose now that the router is chosen independently, with the same probabilities, for each of the two packets. Compute the probability that at least one of the two packets is lost.
Leave fractions unevaluated.
Show the result
(a) .
(b) , ; since , and are not independent.
(c) .
Show the full solution
Setting up. Let and be the events "the pair goes through " and "through ": they form a partition, with and . Inside each router the two packets are lost independently, with probability at and at . This is a two-stage scheme: first the router, then the packets. The tool is the Law of Total Probability and Bayes' RuleThe law of total probability computes P(E) by averaging conditional probabilities over a partition, and Bayes' rule inverts the conditioning to obtain posterior probabilities, as in the interpretation of diagnostic tests.Law of Total Probability and Bayes' Rule →: condition on the first stage, compute inside each branch, then average with the weights .
(a) Given , the number of lost packets is binomial with and , so "exactly one lost" has probability (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 →): By total probability Typical mistake: writing with an "average" (here ) instead of averaging the probabilities over the router; this gives .
(b) For one packet, and in the same way. For the pair, the conditional independence given the router gives , hence Independence (Independence of EventsTwo events are independent when P(E and F) = P(E)P(F), equivalently when conditioning on one does not change the probability of the other; independence of three events requires both the pairwise and the triple product conditions.Independence of Events →) would require , while . The two numbers differ, so and are not independent. The reason: knowing that the first packet was lost makes the bad router more likely, and this raises the probability that the second one is lost too (). Typical mistake: concluding independence from "the packets are lost independently at each router": that is independence conditional on the router, which is weaker than independence (Applications of IndependenceIndependence simplifies computations of probabilities of unions and of 'exactly one' events, and it is the tool to construct the equiprobable and the binomial probability measures on the space of n-bit sequences.Applications of Independence →).
(c) Now the two packets use two routers chosen independently, so and are functions of independent choices and independent losses: they are independent events, each with by (b). Using the complement and independence of the complements, Comparison: with the shared router of (b) the same event has probability , slightly smaller than : sharing the router makes the two losses cluster together, so "at least one lost" becomes a little less likely.
Exercise 2 (points 4 = 2+2)
(a) Items on an assembly line are tested one by one; each item is defective with probability , independently of the others. Let be the index of the first defective item, so . Compute and .
(b) In one hour a call centre receives calls from landlines and calls from mobiles, with and independent. Let be the total number of calls. Determine the law of , compute and .
Show the result
(a) ; .
(b) ; ; .
Show the full solution
(a) For the tail is : the first items must all be good (Geometric Random VariableThe geometric random variable counts the trial at which the first success occurs in independent binary trials; it has infinite alphabet, density (1-p)^(k-1) p, mean 1/p and the memoryless property.Geometric Random Variable →). With : because . This is the memoryless property: , here with (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 →). The three good items already seen do not change the future.
For the even values , write with and sum the density : Typical mistakes: is correct, but is not a conditional probability (and is negative); the sum of a geometric series starts from the first term actually present ( gives the factor out front).
(b) By the properties of the characteristic function (Characteristic Functionsmoments and the moment generating function lead to the characteristic function, the Fourier transform of the density, which always exists, characterizes the distribution, turns sums of independent variables into products and gives moments by differentiation; the multivariate version works the same way for random vectors.Characteristic Functions →): for independent Poisson variables , which is the characteristic function of . Since the characteristic function determines the law, . (Equivalently, the density of is the convolution and the binomial theorem gives .)
For the probability, pass to the complement: .
For the second moment use (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 →); for a Poisson law mean and variance both equal the parameter, so . Typical mistake: thinking (product) or that the sum of two Poissons is not Poisson.
Exercise 3 (points 7 = 2+2+3)
Let be a random vector with joint density with a constant.
(a) Determine and the marginal densities and .
(b) Are and independent? Compute .
(c) For determine the conditional density and compute . Then compute .
Show the result
(a) ; ; .
(b) Not independent. .
(c) ; ; .
Show the full solution
The support. is the triangle with vertices , , . For a fixed the variable runs in ; for a fixed the variable runs in . These two descriptions give the limits of integration: drawing first avoids most mistakes (Absolutely Continuous Random VectorsAn absolutely continuous random vector (X,Y) has a joint density f_XY with F_XY the double integral of f_XY; probabilities of sets are double integrals, marginals are obtained by integrating out one variable, the uniform vector on D has density 1/area(D) on D, and the density of X + Y is an integral of f_XY along the line x + y = z.Absolutely Continuous Random Vectors →).
(a) Normalization: the density must integrate to on , so . The marginals are obtained by integrating out the other variable over the section of : Check: and . Typical mistake: integrating from to (instead of to ) to get : the result would be a constant times a wrong function that is not a density.
(b) If and were independent we would have for all (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 →). Here the product is strictly positive on the whole square , while for (for example at ). So and are not independent. The support is not a rectangle: this alone already excludes independence.
The event cuts in the region , bounded by the lines and , which meet at ; so runs from to and, for each , runs from to :
(c) The conditional density is the ratio of the joint density to the marginal of the conditioning variable, defined where (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 →): It integrates to on , as it must. The conditional expectation (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 →): For : on , and the conditional distribution function is , so Typical mistake: integrating over instead of when computing the conditional probability.
Exercise 4 (points 6 = 2+2+2)
Two components work independently. Their lifetimes (in hours) are and , with densities and for .
(a) The system fails as soon as one component fails. Determine the distribution function and the density of , and compute and .
(b) A second system works until both components have failed. Determine the distribution function and the density of , and compute .
(c) Using the convolution, determine the density of and compute .
Show the result
(a) for , so with density ; ; .
(b) for ; ; .
(c) ; .
Show the full solution
(a) Work with the complement of the distribution function (Distribution FunctionThe distribution function F_X(x) = P(X <= x) is an alternative to the discrete density; for a discrete random variable it is a right-continuous non-decreasing step function whose jumps are the values of the density.Distribution Function →). The minimum exceeds if and only if both variables exceed , and by independence the probabilities multiply: Hence for (and for ), which is the distribution function of ; differentiating, . Then , and directly from the formula above. (The minimum of independent exponentials is exponential with the sum of the rates.)
(b) The maximum is at most if and only if both variables are at most , and again independence gives a product, now of distribution functions: Differentiating: for . The mean, using term by term (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 →): Check: , so . Typical mistake: multiplying the densities (or the tails) for the maximum: the product rule holds for in the max case and for in the min case.
(c) For independent variables the density of the sum is the convolution of the densities, (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 →, see also the sums of independent variables in Characteristic Functionsmoments and the moment generating function lead to the characteristic function, the Fourier transform of the density, which always exists, characterizes the distribution, turns sums of independent variables into products and gives moments by differentiation; the multivariate version works the same way for random vectors.Characteristic Functions →). Both densities vanish for negative arguments, so and for : Check: and . Then Typical mistake: leaving the integration limits without noting that the integrand vanishes outside .
Exercise 5 (points 6 = 2+2+2)
Let be a random variable with and .
(a) Compute the characteristic function and show that it can be written as .
(b) Using the characteristic function, compute and . What can be said about the odd moments?
(c) Let and be independent with the same law as , and . Compute the characteristic function of , recognize the law of and compute .
Show the result
(a) .
(b) , ; all odd moments are .
(c) ; ; .
Show the full solution
(a) By definition (Characteristic Functionsmoments and the moment generating function lead to the characteristic function, the Fourier transform of the density, which always exists, characterizes the distribution, turns sums of independent variables into products and gives moments by differentiation; the multivariate version works the same way for random vectors.Characteristic Functions →), for a discrete variable : where the last step is the identity with . The function is real and even because the density of is symmetric.
(b) The theorem of moments: . With : The odd derivatives are multiples of , which vanishes at , so (obvious also from the symmetry of the density). Direct check: and is the same since here. The variance is . Typical mistake: forgetting the factor (for it changes the sign).
(c) For independent variables the characteristic function of the sum is the product (Characteristic Functionsmoments and the moment generating function lead to the characteristic function, the Fourier transform of the density, which always exists, characterizes the distribution, turns sums of independent variables into products and gives moments by differentiation; the multivariate version works the same way for random vectors.Characteristic Functions →): For the affine transformation the characteristic function is , which is the characteristic function of (the characteristic function of is ). The characteristic function determines the law, so , i.e. Then . Check with the variance: . Typical mistake: concluding that without the shift by : takes negative values.
Exercise 6 (points 4 = 2+2)
Let be i.i.d. random variables with finite mean and finite variance , and let .
(a) Prove, using the Chebyshev inequality, that in probability (law of large numbers).
(b) A coin lands heads with an unknown probability and is tossed times; let be the relative frequency of heads. Use the Chebyshev inequality to find a number of tosses that guarantees, whatever the value of , .
Show the result
(a) for every .
(b) tosses are enough (any ).
Show the full solution
(a) First compute mean and variance of (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 →). By linearity . Since the are independent, the variances add (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 →), and Now the Chebyshev inequality (Markov and Chebyshev InequalitiesFor a nonnegative random variable P(X >= a) is at most E(X)/a (Markov), and for any random variable with finite mean and variance P(|X - E(X)| >= eps) is at most var(X)/eps^2 (Chebyshev); both bounds are loose but universal, valid whatever the distribution.Markov and Chebyshev Inequalities →) applied to : for every Since a probability is nonnegative, for every , which is the definition of . Typical mistakes: using (forgetting the ) or applying Chebyshev to without rescaling .
(b) The tosses are i.i.d. Bernoulli, so and , and is unknown. By (a), The bound must hold for every , so we use the worst case: for all (the maximum of the parabola is at ). Then So tosses suffice. Remark: Chebyshev is universal but very conservative. For and the exact binomial probability is below ; the Central Limit Theoremthe standardized arithmetic mean of iid random variables with finite variance converges in distribution to N(0,1), whatever the distribution of the variables, which justifies the Gaussian approximation of sums.Central Limit Theorem → gives a far smaller number of tosses (a few hundred) for the same accuracy, but with an approximation instead of a guarantee.
Self-assessment grid
| Exercise | Points | What is needed for full marks | Typical mistakes |
|---|---|---|---|
| 1 | 5 | (a) binomial inside each router, total probability: (2); (b) , , not independent, with reason (2); (c) independent routers, complement: (1) | averaging the loss probability before using the binomial; confusing independence given the router with independence; checking independence without computing |
| 2 | 4 | (a) tail , memoryless , geometric series (2); (b) with justification, , (2) | writing ; wrong first term of the series; parameter of the sum of Poissons computed as a product; forgetting in the second moment |
| 3 | 7 | (a) , , with section limits (2); (b) non-rectangular support gives non-independence, with the right region (2); (c) on , , (3) | integrating over the square instead of the triangle; wrong limits for the marginals; conditional density not integrating to ; forgetting the support in the conditional probability |
| 4 | 6 | (a) product of tails, , , (2); (b) product of distribution functions, density, (2); (c) convolution on , , (2) | using tails for the max and distribution functions for the min; multiplying densities; wrong integration limits in the convolution |
| 5 | 6 | (a) (2); (b) moments via : , odd moments zero (2); (c) , shift to , (2) | missing ; instead of ; forgetting the shift by |
| 6 | 4 | (a) , , Chebyshev and limit (2); (b) worst case , (2) | ; using the unknown in the final bound instead of the worst case; Markov applied to a variable that is not nonnegative |