Difference between revisions of "Documentation/How Tos/Calc: CHISQDIST function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(New page: __NOTOC__ This function is not yet implemented but expected for OpenOffice.org version 3.1. == CHISQDIST == Calculates values for a χ<sup>2</sup>-distribution. === Syntax === <tt>''...)
 
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
This function is not yet implemented but expected for OpenOffice.org version 3.1.
 
  
 
== CHISQDIST ==
 
== CHISQDIST ==
Line 23: Line 22:
 
:<math>=
 
:<math>=
 
\begin{cases}
 
\begin{cases}
  0, & \textrm{if}\; x < 0 \\
+
  0, & \textrm{if}\; x \le 0 \\
  
  \displaystyle \frac {x^{\frac k 2 -1}\,\mathrm e^{- \frac x 2}} {2^{\frac k 2}\,\Gamma(\frac k 2) }, &  \textrm{if}\; x \ge 0
+
  \displaystyle \frac {x^{\frac k 2 -1}\,\mathrm e^{- \frac x 2}} {2^{\frac k 2}\,\Gamma(\frac k 2) }, &  \textrm{if}\; x > 0
 
\end{cases}
 
\end{cases}
 
  </math>
 
  </math>
Line 32: Line 31:
 
:<math>=
 
:<math>=
 
\begin{cases}
 
\begin{cases}
  0, & \textrm{if}\; x<0 \\
+
  0, & \textrm{if}\; x \le 0 \\
  \displaystyle \int_0^x \frac {t^{\frac k 2 -1}\,\mathrm e^{- \frac t 2}} {2^{\frac k 2}\,\Gamma(\frac k 2) }\,\mathrm d t, & \textrm{if}\; x \ge 0
+
  \displaystyle \int_0^x \frac {t^{\frac k 2 -1}\,\mathrm e^{- \frac t 2}} {2^{\frac k 2}\,\Gamma(\frac k 2) }\,\mathrm d t, & \textrm{if}\; x > 0
 
\end{cases}
 
\end{cases}
 
</math>
 
</math>
  
 
=== Example ===
 
=== Example ===
<tt>'''CHSQDIST(2.7;3;FALSE())'''</tt>
+
{|
: returns approximately 0.1699395239
+
|-
 +
|<tt>'''CHISQDIST(2.3;15;FALSE())'''</tt>
 +
:returns approximately 0,000209862
  
<tt>'''CHSQDIST(2.7;3;TRUE())'''</tt>
+
<tt>'''CHISQDIST(2.3;2;FALSE())'''</tt>
: returns approximately 0.5597727056
+
:returns approximately 0,158318385
 +
 
 +
|[[Image:ChiDistributionDensity.png|Graphs of Chi-distribution density functions]]
 +
|}
 +
 
 +
{|
 +
|-
 +
|<tt>'''CHISQDIST(1.5;2;TRUE())'''</tt>
 +
:returns approximately 0,5276334
 +
other valid call: <tt>'''CHISQDIST(1.5;2)'''</tt>
 +
|[[Image:ChiDistributionCumulativeLeftTail.png|Chi-distribution cumulative functions]]
 +
|}
 +
 
 +
{|
 +
|-
 +
|<tt>'''CHISQDIST(18;15;TRUE())'''</tt>
 +
:returns approximately 0,73733444
 +
|[[Image:ChiDistributionLeftTailArea.png|Area under density function]]
 +
 
 +
[[Image:ChiDistributionCumulativeMarked.png|Chi-distribution with marked point]]
 +
|}
  
 
=== Remarks ===
 
=== Remarks ===
  
 
If you need <tt>CHISQDIST(x;k;TRUE())</tt> with a non integer parameter k, then use <tt>GAMMADIST(x;k/2;2)</tt> instead.
 
If you need <tt>CHISQDIST(x;k;TRUE())</tt> with a non integer parameter k, then use <tt>GAMMADIST(x;k/2;2)</tt> instead.
 +
 +
For to get the right tail for large values x, do not calculate 1 &minus; CHISQDIST. It is less accurate in those cases than using CHIDIST. <tt>CHISQDIST(x;k;TRUE()) + CHIDIST(x;k) = 1</tt>.
  
 
In the density case the internal calculation uses logarithmic- and exponential function, if x &gt;1425 or x &middot; k &gt; 1391000. The results are less accurate in those cases.
 
In the density case the internal calculation uses logarithmic- and exponential function, if x &gt;1425 or x &middot; k &gt; 1391000. The results are less accurate in those cases.
  
=== See also: ===
+
=== Issues ===
[[Documentation/How_Tos/Calc: CHISQINV function|'''CHISQINV''']],
+
This function is not available in version 3.0 and earlier.
[[Documentation/How_Tos/Calc: CHIDIST function|'''LEGACY.CHIDIST''']],
+
[[Documentation/How_Tos/Calc: CHIINV function|'''LEGACY.CHIINV''']],
+
[[Documentation/How_Tos/Calc: CHITEST function|'''CHITEST''']]
+
  
[[Documentation/How_Tos/Calc: Statistical functions|'''Statistical functions''']]
 
  
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
+
{{SeeAlso|EN|
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
+
* [[Documentation/How_Tos/Calc: CHISQINV function|CHISQINV]]
 +
* [[Documentation/How_Tos/Calc: CHIDIST function|LEGACY.CHIDIST]]
 +
* [[Documentation/How_Tos/Calc: CHIINV function|LEGACY.CHIINV]]
 +
* [[Documentation/How_Tos/Calc: CHITEST function|CHITEST]]
  
=== Issues: ===
+
* [[Documentation/How_Tos/Calc: Statistical functions|Statistical functions]]
This function is not available in version 3.0 and earlier.
+
 
 +
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 +
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 +
[[Category: Documentation/Reference/Calc/Statistical functions]]

Latest revision as of 09:27, 17 July 2018


CHISQDIST

Calculates values for a χ2-distribution.

Syntax

CHISQDIST(x; k; Cumulative)

x is the number, at which you will evaluate the χ2-distribution.
k sets the degrees of freedom for the χ2-distribution
Constraint: k must be a positive integer
Cumulative is a logical value.
In the case Cumulative=TRUE() the cumulative distribution function is used, in the case Cumulative=FALSE() the probability density function. This parameter is optional. It is set to TRUE() if missing.

Semantic

CHISQDIST(x;k;FALSE()) returns values of the probability density function for the χ2-distribution:

CHISQDIST(x;k;TRUE()) returns the left tail probability for the χ2-distribution:

Example

CHISQDIST(2.3;15;FALSE())
returns approximately 0,000209862

CHISQDIST(2.3;2;FALSE())

returns approximately 0,158318385
Graphs of Chi-distribution density functions
CHISQDIST(1.5;2;TRUE())
returns approximately 0,5276334

other valid call: CHISQDIST(1.5;2)

Chi-distribution cumulative functions
CHISQDIST(18;15;TRUE())
returns approximately 0,73733444
Area under density function

Chi-distribution with marked point

Remarks

If you need CHISQDIST(x;k;TRUE()) with a non integer parameter k, then use GAMMADIST(x;k/2;2) instead.

For to get the right tail for large values x, do not calculate 1 − CHISQDIST. It is less accurate in those cases than using CHIDIST. CHISQDIST(x;k;TRUE()) + CHIDIST(x;k) = 1.

In the density case the internal calculation uses logarithmic- and exponential function, if x >1425 or x · k > 1391000. The results are less accurate in those cases.

Issues

This function is not available in version 3.0 and earlier.




See Also
Personal tools