Probability Theory - Midterm Exam of 17 November 2025
Questa pagina non ha ancora la versione ripasso: qui sotto c'è il testo completo.
In questa pagina 5
Midterm exam (first partial test) of Calcolo delle Probabilità, 17 November 2025, Theme A (Bachelor's degrees in Telecommunications Engineering and in Automation Engineering, UniPD). This is the paper of the equivalent Italian-language course, translated into English, because the English-language course does not publish its exams. It covers only the first part of the course (probability spaces, conditional probability, independence, random variables). The sheet does not state the duration of the test. Total: 31 points, split as 8 + 9 + 6 + 8; the points of each part are given in the exercise headings.
Exercise 1 (points 8 = 3+2+3)
(a) Show that if and are independent events, then and are also independent events.
(b) Show that if then .
(c) Prove the following decomposition formula for conditional probability: given three events such that and , one has
Show the result
(a) , so (3 points).
(b) , hence (2 points).
(c) After multiplying by , the formula is equivalent to , which is true by additivity (3 points).
Show the full solution
(a) Hypothesis: , that is (see 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 →). Thesis: .
Write as a disjoint union (see Sample Spaces and EventsThe sample space collects all possible outcomes of an experiment, events are its subsets, and set operations (complement, union, intersection, difference, partitions) translate into statements about what occurs.Sample Spaces and Events →): The two pieces have empty intersection, because . By additivity of (see 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 →): Now use the hypothesis on the last term and the complement rule : This is exactly the definition of independence of and .
Typical mistake: "proving" it by saying that if does not depend on then it does not depend on . This is the statement, not a proof; the proof needs the decomposition above. Another mistake is to confuse independence with .
(b) Subadditivity is property (f) in 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 →: (it follows from and ). Together with : Hence .
Remark. One can also argue with monotonicity: gives , and then . Do not write without justification: it holds only if or , which here has to be shown.
(c) The hypotheses guarantee that all conditional probabilities exist: (monotonicity), so is defined; and make and defined. Use the definition of conditional probability, (see 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 →), on each product: The factors and cancel, and this is the step that uses the hypotheses. Adding the two lines, the right-hand side of the formula is The two events and are disjoint (they differ by versus ) and their union is By additivity, the numerator equals . So the right-hand side equals .
Interpretation. It is the law of total probability (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 →) applied inside the "universe" : the measure is itself a probability measure, and is a partition. Remember that the formula is not : the conditioning on must stay in each factor.
Exercise 2 (points 9 = 3+3+3)
A certain disease XXX affects 0.4% of the male population and 0.5% of the female population. A random sample of 2000 people is chosen, half males and half females.
(a) What is the probability that an individual chosen at random in the sample is ill?
(b) Knowing that the chosen individual is ill, what is the probability that the individual is male?
(c) What is the probability that the number of ill females in the sample is greater than 5? Approximate this value using the Poisson approximation. Leave the sums indicated.
Show the result
(a) (0.45%) (3 points).
(b) (3 points).
(c) With the number of ill females: and with (Poisson approximation) (3 points).
Show the full solution
Setting. Let = "the chosen individual is ill", = "the individual is female", = "male". The percentages are empirical probabilities and give conditional probabilities:
(a) is a partition of the sample space. By the law of total probability (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 →): Typical mistake: answering with the plain mean of the two percentages without noticing that the weights are , (here they happen to be equal, so the mean is correct, but with a sample not split in half it would not be).
(b) Bayes' rule (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 →) inverts the conditioning: Sanity check: the complement is and . Females are a bit more likely to be ill, so among the ill individuals they are the majority: is coherent.
Remark (error in the official solution). The official solution gives . The exact value is , which rounds to , not .
(c) Let = number of ill females in the sample. There are females, and each is ill with probability ; the sample is large and, as in the standard model, the individuals are treated as independent trials (see 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 →: the number of successes in independent trials with the same probability ). Therefore . Passing to the complement (the event is the complement of , a finite sum of six terms): Poisson approximation. When is large and is small, is close to with . This is the Poisson limit law: , proved with characteristic functions in 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 → (the Poisson CF is 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 →). Here and with , whose density is , Numerical values (not required, since the text asks to leave the sums indicated): the exact binomial sum gives and the Poisson sum gives (the two differ only in the seventh decimal), so the approximation is excellent. A Monte Carlo simulation with samples of gives .
Typical mistakes: writing for the complement of (the complement of is , which includes ); using (the number of females is ); using instead of .
Exercise 3 (points 6 = 3+3)
From an urn containing 8 black balls and 6 white balls, 2 draws are made with replacement. At each draw one wins 2 euros if a black ball is drawn, while one loses 1 euro if a white ball is drawn. Let be the random variable that quantifies the gain (or loss).
(a) Determine the discrete density of .
(b) Compute the expected value and the variance of .
Show the result
(a) takes the values with (3 points).
(b) and (3 points).
Show the full solution
(a) Let be the number of black balls drawn in the 2 draws. Since the draws are with replacement, the composition of the urn is the same at each draw and the two draws are independent; each is black with probability . Therefore is the number of successes in independent trials with probability , i.e. (see 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 →): With black balls there are white balls, so the gain is a function of (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 →). The map is injective, so the values are distinct and the probabilities carry over: , , : Check: .
Typical mistake: using the product rule for a draw without replacement (probabilities , etc.). The text says with replacement, so the draws are independent and the denominator stays .
(b) Use the properties of the expected value and of the variance for an affine function (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 →, 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 . For : and , here with , : Hence Check by definition: and , so ✓.
Note on the official solution. The official text stops at without computing the product; the value is . Nothing else is wrong there.
Typical mistake: writing : the constant disappears and the factor is squared.
Exercise 4 (points 8 = 3+2+3)
Let be a random variable with density
(a) Determine the value of the constant .
(b) Compute the distribution function .
(c) Compute and .
Show the result
(a) , that is (3 points).
(b) (2 points).
(c) and (3 points).
Show the full solution
(a) A density must be non-negative: for forces (and would make the interval empty and the integral zero, so ). The normalisation condition (see 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 → for the density/DF relation, here in one variable) gives (We keep the positive root because .)
(b) By definition (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 →). Three cases:
- : the density is on , so .
- : .
- : all the mass is to the left of , so . Consistency check: at the middle branch gives ✓, and at it gives ✓. is continuous, as expected for an absolutely continuous random variable.
Using , the middle branch can also be written .
(c) First, For the conditional probability use the definition (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 inclusion , which gives : Compute the numerator, noticing that so the middle branch of applies: Therefore Remark (error in the official solution). The official solution writes . With one has , not . The final value in the official solution is correct, because it is consistent with (with one would get instead).
Typical mistakes: forgetting that the density is zero outside and integrating from ; using by symmetry (the density is symmetric, but the support is not, so ); computing as without dividing by .
Checks. A script with sympy confirmed , the distribution function, and the values , , ; a Monte Carlo simulation of (inverse of applied to uniform samples) gave frequencies , and .
Self-assessment grid
| Exercise | Points | What must be in the answer for full marks | Typical mistakes |
|---|---|---|---|
| 1(a) | 3 | Decomposition into disjoint events, additivity, use of , factorisation | Saying "it is obvious"; confusing independence with disjointness |
| 1(b) | 2 | Subadditivity (or monotonicity plus inclusion-exclusion) and | Writing without justification |
| 1(c) | 3 | Definition of conditional probability on each term, cancellation of and , partition and additivity | Not stating that the hypotheses make the conditionings defined; dropping from the conditioning |
| 2(a) | 3 | Events with the right conditional probabilities; law of total probability; | Wrong weights; treating as |
| 2(b) | 3 | Bayes' rule with from (a); | Computing instead of |
| 2(c) | 3 | ; ; ; | Sum up to ; ; |
| 3(a) | 3 | , , the three values with probabilities | Draws treated as without replacement; missing the factor for one black ball |
| 3(b) | 3 | and with the affine rules | |
| 4(a) | 3 | ; ; | Integrating the wrong interval; arithmetic slip in |
| 4(b) | 2 | Three branches, with in the middle and consistency at the ends | Missing the branches and ; wrong lower limit |
| 4(c) | 3 | ; definition of conditional probability with the inclusion; | Not dividing by ; assuming symmetry of the density |