User:Regina/MyDrafts

From Apache OpenOffice Wiki
< User:Regina
Revision as of 21:44, 22 December 2008 by Regina (Talk | contribs)

Jump to: navigation, search

CHISQINV

Calculates the inverse of the CHISQDIST function.

Syntax

CHISQINV(p; k)

k is the degrees of freedom for the χ2-distribution.
Constraint: k must be a positive integer
p is the given probability
Constraint: 0 ≤ p < 1

Semantic

CHISQINV(p; k) returns the value x, such that CHISQDIST(x; k;TRUE()) = p.

Example

CHISQINV(0.5; 9)

returns approximately 8.342832692

.

Remarks

If you need CHISQINV(p;k) for a non interger parameter k, then use GAMMAINV(p;k/2;2) instead.

See also:

CHISQDIST LEGACY.CHIDIST LEGACY.CHIINV

Statistical functions

Functions listed alphabetically, Functions listed by category

Issues:

Accuracy

Precision in Calc

Calc uses for its calculation floating point numbers in double precision as defined in IEEE 754 standard. You get the best representation in a spreadsheet cell using the scientific format with format code 0.00000000000000E+000. But because a binary format is used internally, the numbers in calculation might differ slightly from the shown decimal values. Only integers in the range can be represented exactly in the internal format.

Although you can force Calc to show 15 decimal digits, these might not be all accurate. This article lists some of the problems.

Cancellation

If you subtract two non integer numbers, which have nearly the same value, the result has less significant digits then the initial values.

A B C
1 9.99411764795882E-001 =0.999411764795882
2 9.99411764705882E-001 =1699/1700
3 8.99997854020285E-011 =A1-A2
4 8.99996470588235E-011

Cell A4 shows the correct result of , calculated with a computer algebra system with high precision.

Converting Inaccuracy

Most non integer numbers have infinite decimal places in binary format, which has to be rounded somewhere. Calculating with this rounded values and converting back to decimal format gives different values then calculating manually in decimal format.

A B C
1 0.99999876543210000000 =0.99999876543210000000
2 0.00000123456790002141 =1-A1
3
4

No Symbolic π

From mathematics you know sin(π)= 0 and you know that tan(π/2) is undefined. But you cannot get this in Calc, because the value π is always treated as rounded floating point number. It makes no difference using PI() or RADIANDS(180). Calc cannot evaluate π symbolically as computer algebra systems do. That is no special limitation of Calc, but other often used spreadsheet applications work only numerically too.

A B C
1 1.63317787283838E+016 =TAN(PI()/2)
2 1.22460635382238E-016 =SIN(RADIANS(180))
3
Personal tools