margeerreuretnbdesimu.py

Created by raph-couvert

Created on November 05, 2025

978 Bytes


1- marge erreur

Marge = z × (σ / N)

z quantile de la loi normale
sigma ecart type de l'estimateur
N nb de simulations

ici à 95%: 
Marge1 = 0.1 €
z1 = 1.96 (pour 95%)

pour trouver z à 95%:
   alpha = 1-0,95 = 0,05
   1- alpha/2 = 0,975
   dans le tab à 0,975 on trouve 1,96

N = 1000

calcul sigma 

0.1 = 1.96 × (σ / √1000)
σ / √1000 = 0.1 / 1.96
σ = (0.1 / 1.96) × √1000
σ ≈ 1.614

marge à 98% :
  
z2 = 2.326 (pour 98%)
Marge2 = 2.326 × (1.614 / √1000)
Marge2 = 2.326 × 0.05102 ≈ 0.1186 €


Nb simulations pour marge 0,01 à 95%:
  
  relation entre marge et nb simu
Marge = z × (σ / √N)
⇒ √N = (z × σ) / Marge
⇒ N = (z × σ / Marge)2


A.N :
  
z = 1.96 (95%)
σ = 1.614 (calculé précédemment)
Marge_cible = 0.01 €

N = (1.96 × 1.614 / 0.01)2
N = (316.344 / 0.01)2 ??? Attendez, vérifions :

N = (1.96 × 1.614 / 0.01)2
= (3.16344 / 0.01)2
= (316.344)2 = 100,073.5


1. Marge à 98% : 0.1186 €
2. Simulations nécessaires : 100,000




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.