Ivan Karachinsky wrote:
I understand this is normal distribution density function but need to figure out what the variables stand for exactly. M, L, K, R1 and R2
The normally generated numbers are just there to generate some data for testing - you could equally well replace rnorm with runif or any other distribution.
The function Phi calculates the cumulative distribution for the data, that is the number of values less than x. The function f computes the difference in the cumulative distribution between x and x+L. If you make L small enough, then f approximates to the probability density at x.
As for the variables, ...
m is the count of all values of data < x+L
k is the count of all values of data < x
L is the interval over which to compute the difference in cumulative distribution
R1 is k normalized to the total number of points
R2 is m normalized to the total number of points
I'm a little surprised that f is written like that given the existence of Phi, as the whole thing could have been written as (Phi(x+L)-Phi(x))/L
Stuart
Where is "here"? I can't see anything in your post.
Stuart
I understand this is normal distribution density function but need to figure out what the variables stand for exactly. M, L, K, R1 and R2
Ivan Karachinsky wrote:
I understand this is normal distribution density function but need to figure out what the variables stand for exactly. M, L, K, R1 and R2
The normally generated numbers are just there to generate some data for testing - you could equally well replace rnorm with runif or any other distribution.
The function Phi calculates the cumulative distribution for the data, that is the number of values less than x. The function f computes the difference in the cumulative distribution between x and x+L. If you make L small enough, then f approximates to the probability density at x.
As for the variables, ...
m is the count of all values of data < x+L
k is the count of all values of data < x
L is the interval over which to compute the difference in cumulative distribution
R1 is k normalized to the total number of points
R2 is m normalized to the total number of points
I'm a little surprised that f is written like that given the existence of Phi, as the whole thing could have been written as (Phi(x+L)-Phi(x))/L
Stuart
Thank you very much, Stuart!
Не за что, Ива́н.