Friday in the course of statistics, we started the section on confidence interval, and like always, I got a bit confused with the degrees of freedom of the Student (should it be
or
?) and which empirical variance (should we consider the one where we divide by
or the one with
?).
And each time I start to get confused, the student obviously see it, and start to ask tricky questions… So let us make it clear now. The correct formula is the following: let

then

is a confidence interval for the mean of a Gaussian i.i.d. sample.
But the important thing is neither the n-1 that appear as degrees of freedom nor the
that appear in the estimation of the standard error. Like always in mathematical result, the most important part of that result is not mentioned here: observations have to be i.i.d. and to be normally distributed. And not “almost” normally distributed….
Consider the following case: we have
=20 observations that are almost normally distributed. Hence, I consider a student t distribution
An Anderson Darling normality test accepts a normal distribution in 2 cases out of 3.
With a true normal distribution if would be 95% of the cases, so in some sense, I can pretend that I generate almost normal samples.
For those samples, we can look at bounds of the 90% confidence interval for the mean, with three different formulas,

i.e. the correct one, or the one where I considered
degrees of freedom instead of
,

and the one were we condired a Gaussian quantile instead of a Student t one,
for(s in 1:10000){ X=rt(n,df=3) m[s]=mean(X) sd=sqrt(var(X)) IC1[s]=m[s]-qt(.95,df=n-1)*sd/sqrt(n) IC2[s]=m[s]-qt(.95,df=n)*sd/sqrt(n) IC3[s]=m[s]-qnorm(.95)*sd/sqrt(n) }
One the graph below are plotted the distributions of the values obtained as lower bound of the 90% confidence interval,

(the curves with
and
degrees of freedom in quantiles are the same, here).
The dotted vertical line is the true lower bound of the 90%-confidence interval, given the true distribution (which was not a Gaussian one).
If I get back to the standard procedure in any statistical textbook, since the sample is almost Gaussian, the lower bound of the confidence interval should be (since we have a Student t distribution)
mean(IC1) [1] -0.605381
instead of
mean(IC3) [1] -0.5759391
(obtained with a Gaussian distribution instead of a Student one). Actually, both of them are quite different from the correct one which was
quantile(m,.05) 5% -0.623578
As I mentioned in a previous post (here), an important issue is that if we do not know a parameter and substitute an estimator, there is usually a cost (which means usually that the confidence interval should be larger). And this is what we observe here. From a teacher’s point of view, it is an important issue that should be mentioned in statistical courses….
But another important point is also that confidence interval is valid only if the underlying distribution is Gaussian. And not almost Gaussian, but really a Gaussian one. So since with
=20 observations everything might look Gaussian, I was wondering what should be done in practice… Because in some sense, using a Student quantile based confidence interval on some almost Gaussian sample is as wrong as using a Gaussian quantile based confidence interval on some Gaussian sample…

girls willing to marry him, the problem can be assumed as symmetric, especially if I do not want to get feminist leagues on my back).
, she knows the relative rank of
), not his absolute rank. We also assume that
is 


term is because there is only one “best” guy, and the
is the probability that he shows up at time 


is obtained when
, which is the optimal time to stop (or here to start seeking), i.e. 36.7%.
=37% of the candidates (which is the maximum value of the function above), and then to select the first one (if possible) that is better than all previous candidates.

, given that the first 



denote the number of citations of articles published year
during year
(or after
years). And we assume that 








where I though citations were extremely fast. But I might have a non-correct interpretation: it might simply mean that in the Journal of Finance it is common to cite old papers (published 10 or 15 years ago), maybe more common that in stochastic processes…







, the year (of the marriage), and on column
, the age of the man when he gets married. Assume that those were rawdata, i.e. that we have the number of marriages of men of age
, we want to estimate (or predict) the age he will get married, if he gets married. With raw data, we can do it… The first step is to build up triangles (to have a cohort vs. age lecture of the data), and then to consider a model, e.g.
is a year effect, and
is a cohort effect.
and
, where now
denotes the cohort.
is the following





, but unfortunately, I do not think any interpretation is valid (unless demography did not change last century). For instance, the following sum



i.i.d. with distribution
. Here we note
is a random variable. The idea is to assume that 
. Thus, we need to compute the distribution of
which is here extremely simple (due to properties of the Gaussian distribution), i.e.

as an estimator of given our sample data (and thus, we also have a confidence interval since we know the distribution of
. Note, first, that \theta has support
. So we need a distribution on that support. Why not a beta distribution ? E.g.












Recently, I received comments (

arming of minimas is stronger than average temperature, and on other hand, for maximas (high probabilities on the right), the slope is smaller – but positive – so summer are warmer, but not as much as winters.
In the paper on the heat wave in Paris (mentioned 



is the following, with on the left the minimas and on the right the maximas,
is
is

The probability that the sequence appears, assuming that there are 48 possible numbers in the lottery, is








‘s since we have identifiability problems here. Nevertheless, we if consider affine transformation so that 
































