# PDF of a sine wave cycle

1. Jan 16, 2009

### natski

Does anybody know what the pdf of a sine wave cycle is? Or perhaps how to derive it? The problem can be done numerically, but surely there is an analytic expression for this function? There is a numerical solution available at http://www.forexmt4.com/_MT4_Systems/Fisher - The Collection/2775-fisher-130fish.pdf, figure 2.

Thanks,

Natski

2. Jan 18, 2009

### ssd

Pls clarify which is the rv.

3. Jan 19, 2009

### natski

Hi ssd. Note sure what you mean by the rv.

Actually I have now solved this problem. The pdf of a sine wave is given by:

\textrm{P}(x) \textrm{ d}x= \frac{1}{\pi \sqrt{1-x^2}} \textrm{ d}x

Cheers,
Natski

4. Jan 21, 2009

### ssd

R.V. is "random variable".

5. Apr 20, 2010

### Omegatron

Could you show the derivation?

Hmmm... From Wikipedia:

$$\frac{d}{dx} \arcsin x & {}= \frac{1}{\sqrt{1-x^2}}\\$$

Last edited: Apr 20, 2010
6. May 5, 2010

### Omegatron

Actually that makes sense. As the slope of the function increases, the likelihood of getting a point at that value increases, so it would seem that the PDF of a function is the derivative of the inverse function. Most functions don't have inverses, but if there is symmetry or repetition, you can use a partial inverse to figure it out, like using only a single cycle of the sine wave, which is what arcsin does.

So for $$y = x^2$$, for instance, the inverse function is $$x = \pm\sqrt{y}$$, and the derivative of one side of this (since both positive and negative are identical) is $$1 \over {2 \sqrt{x}}$$. Weight it so that the total area under the curve is 1, and it's the PDF.

But what about functions that don't have inverses, and also aren't symmetrical or repetitious? They still have PDFs. Do you just break them up into piecewise functions at each stationary point and then sum up the PDFs for each piece? (Calculate the PDFs for each branch, and then sum them)

Last edited: May 5, 2010
7. May 6, 2010

### Redbelly98

Staff Emeritus
Yes, I think you would have to do it that way.