cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Could anyone explain what is going on here? :)

ptc-4935235
1-Visitor

Could anyone explain what is going on here? :)

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:ptc-4935235)

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

Mathcad.png

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

View solution in original post

6 REPLIES 6
StuartBruff
23-Emerald III
(To:ptc-4935235)

Where is "here"? I can't see anything in your post.

Stuart

Mathcad.png

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

StuartBruff
23-Emerald III
(To:ptc-4935235)

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

Mathcad.png

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!

StuartBruff
23-Emerald III
(To:ptc-4935235)

Не за что, Ива́н.

Announcements

Top Tags