exostabpartiel.py

Created by raph-couvert

Created on May 27, 2025

3.49 KB


EXERCICE 1

On interroge 296 habitants sur leur age et la nuisance sonore.

Donnees globales
 Classe   d age   ni    fi    Fi
 (18,30)        56   18.9   18.9
 (30,40)        73   24.7   43.6
 (40,50)        82   27.7   71.3
 (50,65)        85   28.7  100.0
 Total         296  100.0    --

1) Calcul de la mediane Me
   - On cherche la classe ou la FCC depasse 50.
     FCC a 30 = 43.6 < 50
     FCC a 50 = 71.3 >= 50
     => classe mediane = (40,50)
   - Interpolation lineaire dans (40,50) :
     borne_inferieure = 40
     amplitude_classe  = 10
     Favant = 43.6
     Fe = 50
     Fapres = 71.3
     Me = 40 + 10*(50 - 43.6)/(71.3 - 43.6)
        = 40 + 10*(6.4)/(27.7)
        = 40 + 10*0.2310
        = 40 + 2.31
        = 42.31
     => Me approx 42.3

2) Moyenne et ecart type pour les 116 habitants de nuisance FORTE

   Table reduite :
    Classe   ni   fi    ci
    (18,30)  19  16.4   24
    (30,40)  28  24.1   35
    (40,50)  33  28.4   45
    (50,65)  36  31.0  57.5
    Total   116 100.0   --

   a) Moyenne xbar
      somme_ni_ci = 19*24 + 28*35 + 33*45 + 36*57.5
                  = 456   + 980   + 1485  + 2070
                  = 4991
      xbar = somme_ni_ci / 116
           = 4991 / 116
           = 43.0

   b) Ecart-type sigma
      somme_ni_ci2 = 19*24^2 + 28*35^2 + 33*45^2 + 36*57.5^2
                   = 19*576  + 28*1225 + 33*2025 + 36*3306.25
                   = 10944   + 34300   + 66825   + 119025
                   = 230094
      moment2 = somme_ni_ci2 / 116
              = 230094 / 116
              = 1983.2
      variance = moment2 - xbar^2
               = 1983.2 - 43.0^2
               = 1983.2 - 1849
               =   134.2
      sigma = sqrt(variance)
            = sqrt(134.2)
            = 11.58
      => sigma approx 11.6

3) Estimateurs sans biais (n = 116)
   - Moyenne m_hat = xbar = 43.0
   - Variance S2 = (1/(116-1))*sum((xi - xbar)^2)
     Or on peut poser S2 = variance calculee ci-dessus = 134.2

---

EXERCICE 2

Xi ~ Bernoulli(p=0.02), xbar_n = (1/n)*sum(Xi)

1) Loi et moments
   E(xbar_n) = p = 0.02
   Var(xbar_n) = p*(1-p)/n = 0.0196/n

2) Taille minimale n par TCL pour
   P(0.015 <= xbar_n <= 0.025) >= 0.99

   On pose Z = (xbar_n - p)/sqrt(p*(1-p)/n) ~ N(0,1)

   Condition centrale :
     0.015 <= xbar_n <= 0.025
     <=> (0.015 - 0.02)/sqrt(0.0196/n) <= Z <= (0.025 - 0.02)/sqrt(0.0196/n)
     Les deux bornes sont symetriques en valeur absolue = 0.005/sqrt(0.0196/n)
     Il faut 0.005/sqrt(0.0196/n) >= z_{0.995} = 2.58

   Calcul :
     0.005 / sqrt(0.0196/n) >= 2.58
     <=> 0.005*sqrt(n)/sqrt(0.0196) >= 2.58
     <=> sqrt(n) >= 2.58 * sqrt(0.0196) / 0.005
               = 2.58 * 0.14 / 0.005
               = 0.3612 / 0.005
               = 72.24
     <=> n >= 72.24^2 = 5218.6
     => n_min = 5219

---

EXERCICE 3

Echantillon x1,...,xn de loi exponentielle param T>0

1) Fonction de vraisemblance L(T)
   L(T) = product_{i=1..n}[1/T * exp(-xi/T)]
        = T^{-n} * exp(- sum(xi)/T)

   Log-vraisemblance lnL(T)
   lnL = - n*ln(T) - (1/T)*sum(xi)

2) Derivees
   d(lnL)/dT = -n*(1/T) + (sum(xi))*(1/T^2)
             = -n/T + sum(xi)/T^2

   d2(lnL)/dT2 = n/T^2 - 2*sum(xi)/T^3

---

EXERCICE 4

3) EMV T_hat_n
   On cherche T qui annule d(lnL)/dT
     d(lnL)/dT = n/T^2 *(-T + xbar)
     Signe change a T = xbar
     => EMV T_hat = xbar_n

4) Propriete de T_hat_n
   - Sans biais : E(T_hat) = E(xbar_n) = T
   - Convergent : xbar_n -> T (loi forte ou TCL)
   - Efficace :
       Information de Fisher I(T) = n/T^2
       Var(T_hat) = Var(xbar_n) = T^2/n = 1/I(T)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.