Lien de la note Hackmd
La variable aleatoire
Nous n'avons pas de valeur pour
Pour la loi de Pareto de parametre
pour
Determinons l'EMV.
On a:
d'ou
et
Ainsi
equivaut a
Nous obtenons la solution
Reste a verifier la condition du second ordre:
Par consequent,
Asymptotiquement,
La zone de rejet est:
ou
:::
Considerons
ou le parametre
Nous disponsons de
On saute les 2 premieres questions car fait et refait
3.
$$
\begin{aligned}
T &= \frac{L(X_n,\dots,X_n,\theta_1)}{L(X_n,\dots,X_n,\theta_0)}\\
&= \frac{\prod_{i=1}^n\theta_1^2X_ie^{-\theta_1X_i}}{\prod_{i=1}^n\theta_0^2X_ie^{-\theta_0X_i}}\\
&= \biggr(\frac{\theta_1}{\theta_0}\biggr)^{2n}\times e^{\sum_{i=1}^n(\theta_0-\theta_1)}
\end{aligned}
$$
On passe au logarithme:
$$
\begin{aligned}
\ln T&= \underbrace{2n\log(\frac{\theta_1}{\theta_0})}_{\color{green}{a}}+\underbrace{(\theta_0-\theta_1)}_{\color{green}{b}}\sum_{i=1}^nX_i
\end{aligned}
$$
L'hypothese $H_0$ est rejetee lorsque:
$$
\begin{aligned}
T&\gt C_{\alpha}\\
\ln T&\gt\ln C_{\alpha}\\
a+b\sum_{i=1}^nX_i&\gt\ln (C_{\alpha})\\
\underbrace{\sum_{i=1}^n X_i}_{\color{red}{T_n}}&\lt \underbrace{\frac{\ln(C_{\alpha})-a}{b}}_{\color{red}{S_{\alpha}}}
\end{aligned}\\
\color{green}{\text{car } b = \theta_0-\theta_1\lt 0}
$$
Donc:
$$
T_n\lt S_{\alpha}
$$
Sous
Ou
Exprimons
Or sous
Donc:
En python:
scipy.stats.gamma.cdf(2 * scipy.stats.gamma.ppf(0.05, 20, scale=1), 20, scale = 1)
0.9184...
scipy.stats.gamma.cdf(2 * scipy.stats.gamma.ppf(0.05, 50, scale=1), 50, scale = 1)
0.999702...
scipy.stats.gamma.cdf(2 * scipy.stats.gamma.ppf(0.01, 10, scale=1), 10, scale = 1)
0.316165...
scipy.stats.gamma.cdf(2 * scipy.stats.gamma.ppf(0.001, 100, scale=1), 100, scale = 1)
0.9999523...
On nome
:::
Considerons
avec
Nous souhaitons tester l'hypothese
On pose
Ainsi:
Elle est derivable car elle est polynomiale et est bijective car elle est strictement croissante.
On peut en deduire que
Sous
Passons aux applications numeriques:
scipy.stats.chi2.cdf(0.5 * scipy.stats.ppf(0.95, 30), 30)
0.14185880202947254
scipy.stats.chi2.cdf(0.2 * scipy.stats.ppf(0.95, 60), 60)
1.6239064341119149e-09
scipy.stats.chi2.cdf(0.5 * scipy.stats.ppf(0.99, 20), 20)
0.46403880816957155
scipy.stats.chi2.cdf(0.2 * scipy.stats.ppf(0.99, 20), 20)
1.87204631776198e-08
scipy.stats.chi2.cdf(1.0001 * scipy.stats.ppf(0.99, 20), 20)
0.9900104784496678
:::