**W**hen looking at questions on X validated, I came across this seemingly obvious request for an unbiased estimator of **P**(X=k), when X~**B**(n,p). Except that X is not observed but only Y~**B**(s,p) with s<n. Since **P**(X=k) is a polynomial in p, I was expecting such an unbiased estimator to exist. But it does not, for the reasons that Y only takes s+1 values and that any function of Y, including the MLE of **P**(X=k), has an expectation involving monomials in p of power s at most. It is actually straightforward to establish properly that the unbiased estimator does not exist. But this remains an interesting additional example of the rarity of the existence of unbiased estimators, to be saved until a future mathematical statistics exam!

## Archive for exam

## unbiased estimators that do not exist

Posted in Statistics with tags binomial distribution, counterexample, cross validated, exam, existence of unbiased estimators, monomial, teaching, unbiasedness on January 21, 2019 by xi'an## exams

Posted in Kids, Statistics, University life with tags Basu's theorem, bootstrap, convergence, copies, correction, exam, mathematical statistics, Université Paris Dauphine on February 7, 2018 by xi'an**A**s in every term, here comes the painful week of grading hundreds of exams! My mathematical statistics exam was highly traditional and did not even involve Bayesian material, as the few students who attended the lectures were so eager to discuss sufficiency and ancilarity, that I decided to spend an extra lecture on these notions rather than rushing though conjugate priors. Highly traditional indeed with an inverse Gaussian model and a few basic consequences of Basu’s theorem. actually exposed during this lecture. Plus mostly standard multiple choices about maximum likelihood estimation and R programming… Among the major trends this year, I spotted out the widespread use of strange derivatives of negative powers, the simultaneous derivation of two incompatible convergent estimates, the common mixup between the inverse of a sum and the sum of the inverses, the inability to produce the MLE of a constant transform of the parameter, the choice of estimators depending on the parameter, and a lack of concern for Fisher informations equal to zero.

## philosophy at the 2015 Baccalauréat

Posted in Books, Kids with tags Air France, An Enquiry Concerning Human Understanding, Baccalauréat, Bayesian foundations, David Hume, exam, finals, high school, miracles, philosophy, Scotland on June 18, 2015 by xi'an*[Here is the pre-Bayesian quote from Hume that students had to analyse this year for the Baccalauréat:]*

The maxim, by which we commonly conduct ourselves in our reasonings, is, that the objects, of which we have no experience, resembles those, of which we have; that what we have found to be most usual is always most probable; and that where there is an opposition of arguments, we ought to give the preference to such as are founded on the greatest number of past observations. But though, in proceeding by this rule, we readily reject any fact which is unusual and incredible in an ordinary degree; yet in advancing farther, the mind observes not always the same rule; but when anything is affirmed utterly absurd and miraculous, it rather the more readily admits of such a fact, upon account of that very circumstance, which ought to destroy all its authority. The passion of surprise and wonder, arising from miracles, being an agreeable emotion, gives a sensible tendency towards the belief of those events, from which it is derived.”David Hume,An Enquiry Concerning Human Understanding,

## Vivons-nous pour être heureux ? [bacc. 2014]

Posted in Books, Kids with tags Baccalauréat, essay, exam, France, happiness, philosophy on June 20, 2014 by xi'an** T**his year is my daughter’s final year in high school and she is now taking the dreaded baccalauréat exams. Just like a few hundred thousands French students. With “just like” in the strict sense since all students with the same major take the very same exam all over France… The first written composition is in the “mother of all disciplines”, philosophy, and the theme of one dissertation this year was *“do we live to be happy?”*. Which suited well my daughter as she was hoping for a question around that theme. She managed to quote Plato and Buddha, The Pursuit of Happiness and The Wolf of Wall-street… So sounded happy enough with her essay. This seemed indeed like a rather safe notion (as opposed to ethics, religion, politics or work), with enough material to fill a classical thesis-antithesis-synthesis plan (and my personal materialistic conclusion about the lack of predetermination in our lifes).

## Bayes at the Bac’ [again]

Posted in Kids, Statistics with tags Baccalauréat, Cartesian geometry, complex numbers, exam, high school, integrals, polynomials, sequence, Thomas Bayes on June 19, 2014 by xi'an**W**hen my son took the mathematics exam of the baccalauréat a few years ago, the probability problem was a straightforward application of Bayes’ theorem. (Problem which was later cancelled due to a minor leak…) Surprise, surprise, Bayes is back this year for my daughter’s exam. Once again, the topic is a pharmaceutical lab with a test, test with different positive rates on two populations (healthy vs. sick), and the very basic question is to derive the probability that a person is sick given the test is positive. Then a (predictable) application of the CLT-based confidence interval on a binomial proportion. And the derivation of a normal confidence interval, once again compounded by a CLT-based confidence interval on a binomial proportion… Fairly straightforward with no combinatoric difficulty.

**T**he other problems were on (a) a sequence defined by the integral

(b) solving the equation

in the complex plane and (c) Cartesian 2-D and 3-D geometry, again avoiding abstruse geometric questions… A rather conventional exam from my biased perspective.

## ultimate R recursion

Posted in Books, R, Statistics, University life with tags accept-reject algorithm, computer language, exam, Monte Carlo methods, normalising constant, R, recursion on January 31, 2012 by xi'an**O**ne of my students wrote the following code for his R exam, trying to do accept-reject simulation (of a Rayleigh distribution) and constant approximation at the same time:

fAR1=function(n){ u=runif(n) x=rexp(n) f=(C*(x)*exp(-2*x^2/3)) g=dexp(n,1) test=(u<f/(3*g)) y=x[test] p=length(y)/n #acceptance probability M=1/p C=M/3 hist(y,20,freq=FALSE) return(x) }

which I find remarkable if alas doomed to fail! I wonder if there exists a (real as opposed to fantasy) computer language where you could introduce constants C and only define them later… (What’s rather sad is that I keep insisting on the fact that accept-reject does not need the constant C to operate. And that I found the same mistake in several of the students’ code. There is a further mistake in the above code when defining *g*. I also wonder where the *3* came from…)

## R exam

Posted in Kids, pictures, Statistics, University life with tags exam, harmonic mean estimator, Introduction to Monte Carlo Methods with R, Méthodes de Monte-Carlo avec R, Monte Carlo methods, R, simulation, Université Paris Dauphine on November 28, 2011 by xi'an**F**ollowing a long tradition (!) of changing the *modus vivendi* of each exam in our exploratory statistics with R class, we decided this year to give the students a large collection of exercises prior to the exam and to pick five among them to the exam, the students having to solve two and only two of them. (The exercises are available in French on my webpage.) This worked beyond our expectations in that the overwhelming majority of students went over all the exercises and did really (too) well at the exam! Next year, we will hopefully increase the collection of exercises and also prohibit written notes during the exam (to avoid a possible division of labour among the students).

**I**ncidentally, we found a few (true) gems in the solutions, incl. an harmonic mean resolution of the approximation of the integral

since some students generated from the distribution with density *f* proportional to the integrand over [2,∞) [a truncated gamma] and then took the estimator

although we expected them to simulate directly from the exponential and average the sample to the fourth power… In this specific situation, the (dreaded) harmonic mean estimator has a finite variance! To wit;

> y=rgamma(shape=5,n=10^5) > pgamma(2,5,low=FALSE)*gamma(5) [1] 22.73633 > integrate(f=function(x){x^4*exp(-x)},2,Inf) 22.73633 with absolute error < 0.0017 > pgamma(2,1,low=FALSE)/mean(y[y>2]^{-4}) [1] 22.92461 > z=rgamma(shape=1,n=10^5) > mean((z>2)*z^4) [1] 23.92876

**S**o the harmonic means does better than the regular Monte Carlo estimate in this case!