GENERIRANJE PODATAKA IZ NORMALNE RAZDIOBE

Generiranje niza od n pseudoslučajnih brojeva iz normalne razdiobe N(mi,sigma);(d broj decimala):Uzorak od n=20 pseudoslučajnih podataka iz distribucije N(8,1).

datanormal = IntegerPart[RandomArray[normald, n] 10^d]/10^d//N

{7.56, 8.19, 9.72, 6.72, 7.46, 7.84, 8.2, 7.3, 9.35, 7.33, 5.74, 8.98, 7.99, 8.57, 7.15, 7.41, 8.77, 8.86, 8.26, 7.62}

frrazredi = BinCounts[datanormal, {7, 9, 0.2}]

{1, 2, 3, 1, 2, 2, 1, 1, 1, 2}

midpoints = {7.1, 7.3, 7.5, 7.7, 7.9, 8.1, 8.3, 8.5, 8.7, 8.9}

{7.1, 7.3, 7.5, 7.7, 7.9, 8.1, 8.3, 8.5, 8.7, 8.9}

BarChart[Transpose[{frrazredi, midpoints}]]

[Graphics:../HTMLFiles/vismathematica_90.gif]

-Graphics -

Clear[fvjer]

Clear[Fdist]

normald = NormalDistribution[8, 1] ;

fvje = PDF[normald, x]

Fdist = CDF[normald, x]

^(-1/2 (-8 + x)^2)/(2 π)^(1/2)

1/2 (1 + Erf[(-8 + x)/2^(1/2)])

fvje/.x→6.4

Fdist/.x→6.4

0.110921

0.0547993

<<Graphics`Graphics`

Plot[fvje, {x, 4, 12}]

[Graphics:../HTMLFiles/vismathematica_105.gif]

-Graphics -

Plot[Fdist, {x, 4, 12}]

[Graphics:../HTMLFiles/vismathematica_108.gif]

-Graphics -


Created by Mathematica  (March 24, 2006) Valid XHTML 1.1!