density probabilities

G

garnote

Hi all,

I can obtain density probabilities for normal curve
and Khi2 but not for Student law.
How is possible ?

Thanks,

Serge
 
D

David J. Braden

Age, perhaps, has done something to my brain, nut I don't recall what a
Student law density.

Regardless, check out numerous pages on how to construct the Normal;
IMHO, I would stick with the cumulatives. In the formulas, substitute
the function of interest, and plot is over what you feel is a reasonable
support for the thing, using 100 or as many points as you are
comfortable with. Smooth the graph.

You could use info at
http://www.tushar-mehta.com/excel/charts/normal_distribution/index.htm
and simply reblace the Norn Density with the Student Law.

HTH
Dave Braden
 
M

Michael R Middleton

Serge -
I can obtain density probabilities for normal curve and Khi2 but not for
Student law. How is possible ? <

Excel has TDIST for cumulative probability and TINV for its inverse but no
functions for the height of Student's t density function.

- Mike Middleton, www.usfca.edu/~middleton
 
G

GB

Michael R Middleton said:
Serge -

Student law. How is possible ? <

Excel has TDIST for cumulative probability and TINV for its inverse but no
functions for the height of Student's t density function.

- Mike Middleton, www.usfca.edu/~middleton
My probility theory is a bit rusty, but I thought you can derive the PDF
from the cumulative probility function - surely it's just the gradient?

GB
 
I

Ian Smith

garnote said:
Hi all,

I can obtain density probabilities for normal curve
and Khi2 but not for Student law.
How is possible ?

Thanks,

Serge

The code in the spreadsheet at
http://members.aol.com/iandjmsmith/Examples.xls contains code for the
cdf and inverse of the T-distribution, amongst others.

I did not add code for the pdf's of the continuous distributions as
they can be infinite for some values (e.g. at 0 for the F-distribution
where the numerator degrees of freedom is 1). The pdf is calculated
for all the continuous distributions because it is used for finding
the inverse of the cdf.

So adding

Public Function pdf_tdist(x As Double, df As Double) As Double
df = Fix(df)
If (df <= 0) Then
pdf_tdist = [#VALUE!]
Else
Dim ignore As Double
ignore = tdist(x, df)
pdf_tdist = tdistDensity
End If
End Function


to the code in Module1(code) window (which will have the rest of the
code) will give you access to the density function for the
T-distribution. On Excel 2000 this is accessed via Tools,Macros,Visual
Basic Editor or ALT F11.

This is not intended to be an efficient, just easy for you to use. If
I ever get round to adding pdf's for all the continuous distributions
then I'll program it to be more efficient.

Ian Smith

You're probably quite capable at using Excel with VBA - if so forgive
my clumsy operating instructions!

Also note the T-distribution goes from -infinity to infinity (Excel's
TDIST function only works for non-negative values).
 
T

Tushar Mehta

True, the PDF is the derivative of the CDF. And, conversely, the CDF is
the integral of the PDF.

But what if, like for the Normal distribution, the CDF has a form that
cannot be differentiated?

--
Regards,

Tushar Mehta
MS MVP Excel 2000-2003
www.tushar-mehta.com
Excel, PowerPoint, and VBA tutorials and add-ins
Custom Productivity Solutions leveraging MS Office
 
H

Harlan Grove

...
...
But what if, like for the Normal distribution, the CDF has a form that
cannot be differentiated?
...

Wouldn't it be more accurate to say that definite integrals involving the
normal's pdf have no closed form?
 
R

ryan glenn

hi..
try the this one

application.worksheetfunction.tdist()

i think it will work..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top