All 10 questions UPSC has asked on Bayes and minimax estimation in the Statistics Optional (Paper I, Statistical Inference) from 2002 to 2026, solved step by step – latest first.
Try them yourself first: the same questions, without solutions, are on our Statistical Inference topic-wise PYQs page.
How we check these solutions
These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:
- ✓ Checked by computer the numbers were worked out again independently in code (Python with NumPy/SciPy) and matched.
- ✓ Derivation checked step by step for derivations and approximations, every step was checked, and the result was also tested numerically.
- ✓ Answer checked step by step for descriptive questions, every point was checked against the standard theory.
Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.
Jump to a question (year · question number):
2026 · 4b 2023 · 1e 2016 · 3c 2015 · 1e 2014 · 3b 2013 · 3c 2012 · 1d 2010 · 4c 2005 · 1e 2002 · 3a
A random sample of size is drawn from . Let the prior distribution of be , where , and are known. Obtain the Bayes estimator for under (i) squared error loss function and (ii) absolute error loss function.
Solution
Posterior distribution. The likelihood depends on the data through , and Collect the terms in : Completing the square, the posterior is normal:
(i) Squared error loss. The Bayes estimator is the posterior mean: This is a weighted average of the sample mean and the prior mean. The weights are the precisions and .
(ii) Absolute error loss. The Bayes estimator is the posterior median. A normal distribution is symmetric, so its median equals its mean:
As , or (a vague prior), .
✓ Checked by computer We checked with SymPy that the posterior is normal with the stated mean and variance, and numerically that the posterior mean minimises the expected squared error and the posterior median minimises the expected absolute error.
Differentiate between prior and posterior distributions. In case of squared error loss function, find out the Bayes estimator for unknown parameter.
Solution
Prior distribution. Before the data are seen, our knowledge of the parameter is described by a probability distribution . It may come from past experience or expert judgment, or it may be chosen to be vague.
Posterior distribution. After observing data , we update the prior with Bayes’ theorem:
| Prior | Posterior | |
|---|---|---|
| When | before the data | after the data |
| Based on | belief and past information | belief and the current sample |
| Role | input to the analysis | basis of all inference (estimates, intervals, tests) |
Bayes estimator under squared error loss. With , the Bayes estimator minimises the posterior expected loss Write . Then because the cross term is zero. The first term does not depend on , so is smallest when :
So under squared error loss, the Bayes estimator is the posterior mean. The minimum posterior expected loss is the posterior variance. Because the estimator minimises the posterior risk for every , it also minimises the Bayes risk .
✓ Derivation checked step by step Every step was checked: Bayes’ theorem for the posterior, and the minimisation of the posterior expected loss.
The life of an electric bulb, (in hours), follows the exponential distribution with mean life , where is an unknown parameter. The prior distribution of has a gamma distribution with mean 0.8 and standard deviation 2. The average life of a random sample of size 5 bulbs is 3.8 hours. Calculate the Bayes’ estimate of using the squared error loss function.
Solution
Prior parameters. Take the gamma prior with shape and rate : From and :
Likelihood. and :
Posterior. The gamma prior is conjugate for the exponential: a gamma distribution with shape and rate .
Bayes estimate (squared error loss) = the posterior mean:
So the estimated mean life is hours, close to the sample mean of 3.8, because the prior is very spread out. (The MLE of would be .)
✓ Checked by computer We checked in Python: the prior shape 0.16 and rate 0.2 give mean 0.8 and SD 2, and the posterior mean is 5.16/19.2 = 0.2688.
Consider observations from . Obtain the Bayes estimator for under quadratic loss function when a conjugate prior is assumed for .
Solution
Conjugate prior. The Bernoulli likelihood is It has the form , so the conjugate prior is the beta distribution:
Posterior. which is Beta.
Bayes estimator under quadratic loss = the posterior mean. The mean of Beta is , so
This can be written as a weighted average of the sample proportion and the prior mean: With the uniform prior (), it is .
✓ Derivation checked step by step Every step was checked: the beta prior is conjugate, and the posterior mean follows from the beta mean.
Let and the prior distribution of is . Assuming squared error loss function, obtain the Bayes estimator for . Also obtain Bayes risk.
Solution
Posterior. With one observation : So
Bayes estimator (squared error loss) = the posterior mean:
Bayes risk. The risk function of is Average over the prior , with : This equals the posterior variance , as it must under squared error loss.
✓ Checked by computer We checked by simulation (μ drawn from N(0, 1), then X from N(μ, 1), 10⁶ draws) that the average squared error of X/2 is 0.500.
Let be distributed as and be the prior probability density of . Then obtain the Bayes estimator (under squared error loss) and the Bayes risk.
Solution
Posterior. With the uniform prior, which is Beta.
Bayes estimator (squared error loss) = the posterior mean:
Risk function. and , so
Bayes risk. Under the uniform prior, and . So
✓ Checked by computer We checked with SymPy that the risk of (X+1)/(n+2) is [np(1 − p) + (1 − 2p)²]/(n+2)², and that its average over the uniform prior is 1/(6(n+2)). A simulation for n = 10 gave 0.0139, against 1/72 = 0.0139.
Assume that follow the Binomial, , and that the prior distribution of is the Uniform, . Find the Bayes’ estimator for using the squared error loss function.
Solution
Prior. for .
Likelihood. For an observation from , .
Posterior. the Beta distribution.
Bayes estimator under squared error loss = the posterior mean:
This is Laplace’s “rule of succession”. Unlike the MLE , it never gives 0 or 1.
✓ Derivation checked step by step Every step was checked: the posterior is a beta distribution, and its mean is the Bayes estimator.
is a random sample from Bernoulli population with parameter . Consider that has beta prior distribution with hyper-parameters . Obtain Bayes estimator for under quadratic loss function and hence obtain min max estimator for .
Solution
Bayes estimator. With and the Beta prior, the posterior is Beta, so under quadratic loss
Risk function. and . So The numerator is
Make the risk constant. A Bayes estimator with constant risk is minimax. The risk is constant when both coefficients vanish:
Minimax estimator.
Why it is minimax. is Bayes for the Beta prior, and its risk is constant. For any other estimator , So no estimator has a smaller maximum risk.
(The MLE has maximum risk , which is larger than for every . But has smaller risk when is near 0 or 1.)
✓ Checked by computer We checked with SymPy that the Bayes risk function is constant only when a = b = √n/2. By simulation (n = 16), the risk of the minimax estimator was 0.0100 at every θ tried, against 1/(4(1+√n)²) = 0.0100.
Explain the terms prior and posterior distributions. How are prior distributions selected? What is the role of conjugate prior distribution?
Solution
Prior distribution. In the Bayesian approach, the parameter is treated as a random quantity. The prior expresses what we know or believe about before seeing the data.
Posterior distribution. After observing , Bayes’ theorem combines the prior with the likelihood: The posterior is the updated belief. All Bayesian inference (point estimates, credible intervals, tests) is based on it.
How priors are selected.
- Subjective (informative) priors: from past studies, expert opinion, or historical data. The prior’s mean and spread are matched to what is known (as in fitting a gamma prior with a given mean and SD).
- Conjugate priors: chosen from a family that makes the posterior easy to compute (see below).
- Non-informative (vague) priors: when little is known. Examples are the uniform prior, Jeffreys’ prior (invariant under reparametrisation), and improper flat priors such as .
- Empirical Bayes: prior parameters are estimated from the data of many similar units.
- Hierarchical priors: the prior’s own parameters are given a further (hyper)prior.
Role of the conjugate prior. A family of priors is conjugate to a likelihood if the posterior belongs to the same family. For example:
| Likelihood | Conjugate prior | Posterior |
|---|---|---|
| Bernoulli / binomial () | Beta | Beta |
| Poisson () | Gamma | Gamma |
| Exponential (rate ) | Gamma | Gamma |
| Normal (, known ) | Normal | Normal (precision-weighted mean) |
Conjugate priors:
- give the posterior in closed form, so updating only changes the parameters;
- let the prior parameters be read as “prior observations” (Beta is like successes and failures seen before);
- make sequential updating easy: today’s posterior is tomorrow’s prior;
- are flexible enough, by choice of parameters, to represent a wide range of beliefs.
Their limitation is that the family is chosen for convenience. It may not represent real prior knowledge well.
✓ Answer checked step by step Every point was checked against the standard treatment of prior selection and conjugate families.
Let X be a binomial variate with parameters n and p . Using a quadratic error loss function and a priori distribution of p as . obtain the Bayes’ estimate for p.
Solution
Posterior. With the uniform prior on and an observation ,
Bayes estimate. Under quadratic error loss, the Bayes estimate minimises , so it is the posterior mean:
For example, with and : the MLE is 0, but the Bayes estimate is .
✓ Derivation checked step by step Every step was checked: with π(p) = 1 the posterior is Beta(x + 1, n − x + 1), whose mean is (x + 1)/(n + 2).
More on Statistical Inference
- All Statistics PYQ solutions, topic by topic
- Statistical Inference topic-wise PYQs (questions only, for practice)
- Statistics PYQ analysis: which units carry the marks year by year
- Year-wise question papers
- Statistics booklist
Questions: UPSC Civil Services (Main) Examination, Statistics Paper I, 2002–2026. Solutions: Optional Province. Found an error? Tell us.

