Probability Theory - Mock Exam 1
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 Italian-language course (Calcolo delle Probabilità, Information Engineering, UniPD; model paper: the exam of 24 June 2026). The real papers have six exercises, each split into two or three questions, for 32 points in total; here the points are 5, 4, 7, 6, 6 and 4, as in that paper. The sheets of the real exams do not state the duration, so we propose 2 hours, without notes and without a calculator. The values of needed are given in the text (leave the answers also in closed form whenever possible).
Each exercise has three layers: first only the text, then the final results, then the full solution with links to the theory.
Exercise 1 (points 5)
A factory has three production lines . A battery taken at random from the total production comes from with probability , from with probability and from with probability . Let be the event "the battery fails during the warranty period". The probabilities of failure conditioned on the line are
(a) (2 points) Compute the probability that a battery taken at random fails during the warranty.
(b) (3 points) A battery is found to have failed during the warranty. Compute, for each line, the probability that the battery comes from that line, and say which line is the most likely origin.
Show the result
(a) .
(b) , , . The most likely origin is .
Show the full solution
(a) The events form a partition of the sample space: every battery comes from exactly one line, and . The law of total probabilityThe 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 → gives With common denominator : Note that the three terms are the probabilities : they are useful again in (b).
(b) The definition of Conditional ProbabilityThe conditional probability P(E|F) = P(E and F)/P(F) updates the probability of E after learning that F occurred; it is itself a probability measure and yields the multiplication formula for intersections.Conditional Probability → and the multiplication rule give Bayes' rule: Using the three numerators found in (a): Check: , as it must be, because after the conditioning the lines are still a partition.
The most likely line is (), although is the least reliable ( is the largest failure rate): produces few batteries, so few failures come from it. This is the difference between (reliability of the line) and (origin of a failure).
Typical mistakes. Answering (b) with the largest of the (it would give ), confusing with ; forgetting the denominator of Bayes' rule; posterior probabilities that do not sum to .
Exercise 2 (points 4)
A shelf holds in a row distinct books: of mathematics and of physics. The books are arranged in a row in a random order, all the orders being equally likely.
(a) (2 points) In how many orders are the three physics books next to each other (all three consecutive)?
(b) (2 points) Compute the probability that no two physics books are next to each other.
Show the result
(a) orders.
(b) .
Show the full solution
The sample space is the set of the orders of the books (permutations), with the equiprobable measureProbability 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 probability of an event is the number of favourable orders divided by . See 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 → and 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 →.
(a) Glue the three physics books into one block. Then we arrange objects (the four mathematics books and the block): ways. Inside the block the three physics books can be ordered in ways. By the multiplication principle the favourable orders are Every order with the three physics books consecutive is counted exactly once, because the position of the block and the internal order determine the arrangement uniquely.
(b) Count the favourable orders in two steps.
- Arrange the four mathematics books in a row: ways. They create "gaps" (before the first, between consecutive ones, after the last).
- Put each physics book in a different gap, so that two of them are never adjacent: choose the gaps among the in ways (Binomial CoefficientsBinomial coefficients count the k-element subsets of an n-element set, satisfy the symmetry and Pascal recursion, and combined with equiprobable measures they give probabilities such as team selection, train boarding and urn draws.Binomial Coefficients →) and assign the three distinct physics books to them in ways.
Favourable orders: , so Two different gaps are separated by at least one mathematics book: this is the reason why the condition "no two adjacent" is equivalent to "different gaps".
Typical mistakes. In (a) forgetting the internal orders (getting ); in (b) choosing the places of the physics books among the positions with without imposing the non-adjacency, or forgetting to multiply by and (the books are distinct); confusing the event of (a) with that of (b): "all together" is not the opposite of "no two adjacent".
Exercise 3 (points 7)
Let be a random variable with density where is a constant.
(a) (2 points) Determine and the distribution function .
(b) (2 points) Compute the expected value and the variance of .
(c) (3 points) Let . Determine the density of and compute and .
Show the result
(a) , and
(b) , .
(c) for , for , and otherwise; ; .
Show the full solution
(a) For a density, (see 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 distribution function is ; compute it on each piece.
- : .
- : . At it gives .
- : . At it gives .
- : .
is continuous and non-decreasing, and the two pieces agree at (value ): this is a quick check on the computation.
(b) By the definition of 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 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 → use with Hence
(c) We follow the method of 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 →: start from the distribution function. Since takes values in with probability , takes values in . For , since is increasing for , The point corresponds to , so there are two cases:
- : and ;
- : and .
Differentiating, Check on the normalization: . The same result follows from : for , ; for , .
The probability: (equivalently ).
The expected value of is obtained without using , with the rule of 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 →: , already computed in (b). Using gives the same: .
Typical mistakes. Forgetting that the density has two pieces and integrating a single formula on ; leaving without the constant in the second piece; in (c) writing without the factor (the Jacobian), or ignoring that the two pieces of become two pieces of ; computing as .
Exercise 4 (points 6)
Let be a discrete random vector with joint density given by the table, where takes values and takes values :
(a) (2 points) Determine the marginal densities of and of . Are and independent?
(b) (2 points) Compute and the correlation coefficient .
(c) (2 points) Determine the conditional density of given and compute . Compute also and verify that .
Show the result
(a) , , ; , . Not independent.
(b) ; .
(c) on ; ; ; .
Show the full solution
(a) The marginals are obtained by summing the table over the other variable (Discrete Random VectorsA discrete random vector (X,Y) is described by its joint discrete density p_XY(x_i,y_j) = P(X = x_i, Y = y_j), whose marginals are obtained by summing over the other variable and which gives expectations of any function g(X,Y), including E(XY), covariance and the density of X + Y.Discrete Random Vectors →): row sums for , column sums for . Both sum to . IndependenceDiscrete 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 → requires for all pairs. It fails already at : while . One pair is enough to conclude that and are not independent.
(b) Use (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 →). For add over the cells with : Hence For we need the variances: , so ; , so . Then The covariance is positive, as expected from the table: the large values of go together with the large value . The correlation is between and , as it must be.
(c) See 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 →. For , The three values sum to . Then, by the definition of 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 →, Given , gives and . The random variable takes the value with probability and with probability , so by the law of the iterated expectation which agrees with the value found in (b).
Typical mistakes. Declaring independence after checking only some cells (or because the covariance is small); dividing by instead of in the conditional density ( requires ); using the variance formula without subtracting the square of the mean; forgetting that the cell with probability still counts in the independence test.
Exercise 5 (points 6)
A digital instrument rounds each of independent measurements to the nearest integer. The rounding errors are independent random variables, uniformly distributed on . Let be the total error. Use the values , , .
(a) (2 points) Compute and , and write them for .
(b) (2 points) For , using the central limit theorem, approximate and .
(c) (2 points) Using the normal approximation, find the largest such that .
Show the result
(a) , ; for : and .
(b) ; .
(c) .
Show the full solution
(a) Each is uniform on : and (or directly ). By linearity of the expected value, . Since the are independent, the variance of the sum is the sum of the variances (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 →, 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 →): For : , standard deviation .
(b) The are iid with finite variance, so 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 → says that is approximately . For the standardized variable is , so The variables are continuous, so no continuity correction is needed (it is used only for sums of integer-valued variables).
(c) For general , with : since is increasing and . Solving, , i.e. The largest integer is . (Check with the approximation: for the probability is about , for about .)
Typical mistakes. Standardizing with instead of (using the variance of a single term); using in place of for a two-sided event; inverting the inequality in (c) and answering ; applying a continuity correction to continuous variables.
Exercise 6 (points 4)
Let be a probability space.
(a) (2 points) Three events are said to be independent if they are pairwise independent and . Show with a counterexample that three events that are pairwise independent need not be independent. (b) (2 points) Prove that if or , then is independent of every event .
Show the result
(a) Two fair tosses; , , : pairwise independent ( for each pair) but .
(b) If : . If : .
Show the full solution
The tools are the axioms and the elementary properties of (Probability Measures and AxiomsA probability measure is a non-negative, normalised, sigma-additive map on the sigma-algebra of events; from the three axioms follow the complement rule, monotonicity, subadditivity and inclusion-exclusion, while the axioms do not determine P uniquely.Probability Measures and Axioms →) and the definition of independenceTwo 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 →: if .
(a) It is enough to exhibit one example (see "Independent families of events" in 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 →: the pairwise and the triple conditions are unrelated). Toss a fair coin twice: with the equiprobable measure, each outcome with probability . Let Each event has probability . The pairwise intersections are so the three pairs are independent. But so are not independent.
(b) Case . Since , monotonicity gives . Hence .
Case . Then , and as above . Decompose (disjoint): . Hence .
In both cases and are independent, for every . Note that does not need to be empty or equal to : only its probability matters.
Typical mistakes. In (a) checking only the triple product (or only one pair), or choosing events for which the pairwise independence fails; in (b) deducing from , or forgetting the second case.
Self-assessment grid
| Exercise | Points | What you must show for full marks | Typical mistakes |
|---|---|---|---|
| 1 | 5 | Partition stated; total probability ; Bayes' rule with the three posteriors summing to ; most likely line | Confusing with ; missing denominator |
| 2 | 4 | (a) block of physics books: ; (b) gaps method , probability | Forgetting internal orders; counting without the non-adjacency constraint |
| 3 | 7 | and with two pieces; , ; , two-piece density of , , | Missing the constant in the second piece of ; missing the factor ; |
| 4 | 6 | Marginals; independence refuted with one cell; and ; conditional density, , tower property verified | Checking independence on some cells only; wrong denominator in the conditional density |
| 5 | 6 | , ; standardization with ; and ; so | Wrong standard deviation; instead of ; direction of the inequality in (c) |
| 6 | 4 | (a) explicit counterexample (two coin tosses) with the three pairwise products and the failed triple product; (b) monotonicity for , decomposition of for | Verifying only some pairs; deducing from |