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).