Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = 10000 // # de points pour le tracé
- L = linspace(-3, 3, s) // domaine des fonctions de répartition
- function F = frep(X)
- // X : vecteur contenant d réalisations d'une v.a.
- F = []
- for i = 1:s
- F(i) = length(find(X <= L(i))) / length(X)
- end
- endfunction
- //----------------------------------------------------------
- // suite de tirages
- n = 10 // # de tirages dans une réalisation
- d = 5000 // # de réalisations
- Xn = grand(n, d, "uin", 0, 3)
- mu = 1.5
- V = 9/12
- //----------------------------------------------------------
- // moyenne empirique
- Xnb = sum(Xn, 1) / n
- //plot2d(L, frep(Xnb))
- //----------------------------------------------------------
- // moyenne empirique centrée réduite
- M = (Xnb - mu * ones(1, d)) ./ sqrt(V/n)
- plot2d(L, frep(M))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement