Re: Calculation of critical p-, z-, t- and F-values
- From: iandjmsmith@xxxxxxx
- Date: Wed, 14 Nov 2007 04:30:23 -0800
On 14 Nov, 11:16, "Nasser Abbasi" <n...@xxxxxxxxx> wrote:
<iandjmsm...@xxxxxxx> wrote in message
news:1195038272.573775.184990@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have never used Mathematica, so I do not understand all of your
notes on its use.
I gather when you ask for
Quantile[StudentTDistribution[120], 975/1000]
it returns 2*Sqrt[30*(-1 + 1/InverseBetaRegularized[1, -(19/20), 60,
1/2])] as the symbolic equivalent of it and then evaluates this
expression and outputs it as 1.9799304050824413.
Mathematica does everthing when possible in symbolic form (numbers are kept
in rational form, etc..) unless there is a numeric value in the expression
(i.e. decimal). So, yes, all the above calculations are done analytically,
then at the end a user can ask for the numerical value using the function
N[].
Can you control the accuracy of the calculation?
Yes.
I am just curious
because none of the values returned are particularly accurate and if
Quantile[StudentTDistribution[100000000], 0.975] returns
1.959964074411019 then it is surprisingly inaccurate (relative error
of about 3e-8).
Tis is the actual Quantile expression:
Quantile[StudentTDistribution[100000000], 975/1000]
10000*Sqrt[-1 + 1/InverseBetaRegularized[1, -(19/20), 50000000, 1/2]]
I can now Ask Mathematica to give me the numerical value of the above to 50
decimals for example
N[%, 50]
1.9599640082627668207600863127853028493573117315681873087708854414654`50.
In my last message I was using the default settings. Is the above asnwer
accurate enough now?
Nasser
I've got it. The problem was you asked for
Quantile[StudentTDistribution[100000000], 0.975] and the 0.975 causes
it to work to machine precision. The method of calculation is very
poor and hence only delivers a results with relative error of 3e-8.
You can ask for exact calculations with
Quantile[StudentTDistribution[100000000], 975/1000]
According to http://reference.wolfram.com/mathematica/ref/N.html?q=N&lang=en
N[%, n] attempts to give a result with n-digit precision.
It is not clear what is stopping it giving rather than attempting to
give a result with n-digit precision. The + operation is going to lose
about 8 figures so InverseBetaRegularized[1, -(19/20), 50000000, 1/2]
must be calculated to about 58 digits to give 50 digit accuracy. I am
still lost as to why it has printed out 68 digits. Maybe that is how
many figures it did the calculations to.
Ian Smith
.
- Follow-Ups:
- Re: Calculation of critical p-, z-, t- and F-values
- From: Nasser Abbasi
- Re: Calculation of critical p-, z-, t- and F-values
- References:
- Calculation of critical p-, z-, t- and F-values
- From: schuetz-daniel
- Re: Calculation of critical p-, z-, t- and F-values
- From: Nasser Abbasi
- Re: Calculation of critical p-, z-, t- and F-values
- From: schuetz-daniel
- Re: Calculation of critical p-, z-, t- and F-values
- From: Nasser Abbasi
- Re: Calculation of critical p-, z-, t- and F-values
- From: Karl Ove Hufthammer
- Re: Calculation of critical p-, z-, t- and F-values
- From: Barry W Brown
- Re: Calculation of critical p-, z-, t- and F-values
- From: David Winsemius
- Re: Calculation of critical p-, z-, t- and F-values
- From: Nasser Abbasi
- Re: Calculation of critical p-, z-, t- and F-values
- From: iandjmsmith
- Re: Calculation of critical p-, z-, t- and F-values
- From: Nasser Abbasi
- Calculation of critical p-, z-, t- and F-values
- Prev by Date: Combinatorial probability problem
- Next by Date: Re: Combinatorial probability problem
- Previous by thread: Re: Calculation of critical p-, z-, t- and F-values
- Next by thread: Re: Calculation of critical p-, z-, t- and F-values
- Index(es):
Relevant Pages
|