Re: draw PDF curve
- From: Torsten Hennig <Torsten.Hennig@xxxxxxxxxxxxxx>
- Date: Tue, 26 Apr 2005 03:04:10 EDT
>X is a random variable. In the simulation program, I >have obtained
>series of numbers for this variable: 0.1, 0.2312, 0.343, >5.0343.....
>
>I hope to draw probability density function based on >this discrete
>number.
>
>Any suggestions for this? Thanks in advance.
Hi,
let N be the number of simulated values for the random
variable X.
Choose the smallest value X_min and the largest
value X_max obtained by the simulation.
Divide the interval [X_min,X_max] into M subintervals
I_1, I_2, ..., I_M.
Count how many of the simulated values of X fall into each of the subintervalls I_i (i=1,...,M).
Let these numbers be given by N_1,...,N_M
(N_1 + ... + N_M = N).
Now approximate the value of the probability density function at the midpoint of the interval I_i by N_i/N.
(Maybe it's easier to approximate the cumulative
density function F of X by
F(x) = 1/N * sum (i=1,...,N) I[-oo,x] (x_i)
where x_1,...,x_N are the values obtained by the
simulation and I[-oo,x] is the indicator function
of the intervall [-oo,x].)
Best wishes
Torsten.
.
- References:
- draw PDF curve
- From: ZHANG Yan
- draw PDF curve
- Prev by Date: Re: Algebraic closed fields aren't countable.
- Next by Date: Re: Laplace transform of [f(x)]^2
- Previous by thread: Re: draw PDF curve
- Next by thread: Re: draw PDF curve
- Index(es):
Relevant Pages
|