Difference between revisions of "User:Regina"

From Apache OpenOffice Wiki
Jump to: navigation, search
 
(54 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
;native language: German
 
;native language: German
;active in project: de, qa. sc
+
;active in project: de, qa, sc, graphics, LibreOffice, Apache OpenOffice
;OOo user name: regina
+
;user name: regina
 
;special interest: www.ooowiki.de
 
;special interest: www.ooowiki.de
 
+
;email: rb.henschel@t-online.de
  
 
[[Anleitung]]
 
[[Anleitung]]
  
==Sandbox==
+
== ToDo ==
 
+
=== Working on functions sides ===
 
+
 
+
== CHISQDIST ==
+
Calculates values for a &chi;<sup>2</sup>-distribution.
+
 
+
=== Syntax ===
+
<tt>'''CHISQDIST(x; k; Cumulative)'''</tt>
+
 
+
: <tt>'''x'''</tt> is the number, at which you will evaluate the &chi;<sup>2</sup>-distribution.
+
 
+
: <tt>'''k'''</tt> sets the degrees of freedom for the &chi;<sup>2</sup>-distribution
+
 
+
::Constraint: k must be a positive integer
+
 
+
: <tt>'''Cumulative'''</tt> is a logical value.
+
: In the case <tt>Cumulative=TRUE()</tt> the cumulative distribution function is used, in the case <tt>Cumulative=FALSE()</tt> the probability density function. This parameter is optional. It is set to <tt>TRUE()</tt> if missing.
+
 
+
=== Semantic ===
+
 
+
<tt>'''CHISQDIST(x;k;FALSE())'''</tt> returns values of the probability density function for the &chi;<sup>2</sup>-distribution:
+
 
+
:<math>=
+
\begin{cases}
+
0, & \textrm{if}\; x < 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
+
\end{cases}
+
</math>
+
 
+
<tt>'''CHISQDIST(x;k;TRUE())'''</tt> returns the left tail probability for the &chi;<sup>2</sup>-distribution:
+
:<math>=
+
\begin{cases}
+
0, & \textrm{if}\; x<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
+
\end{cases}
+
</math>
+
 
+
=== Example ===
+
<tt>'''CHSQDIST(2.7;3;FALSE())'''</tt>
+
: returns approximately 0.1699395239
+
 
+
<tt>'''CHSQDIST(2.7;3;TRUE())'''</tt>
+
: returns approximately 0.5597727056
+
 
+
=== 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.
+
 
+
In the density case the internal calculation uses logarithmic- and exponential function, if x &gt;1425 or x &middot; k &gt; 1391000. Therefore it is less accurate then than in other cases.
+
 
+
=== See also: ===
+
[[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''']]
+
 
+
 
[[Documentation/How_Tos/Calc: Statistical functions|'''Statistical functions''']]
 
[[Documentation/How_Tos/Calc: Statistical functions|'''Statistical functions''']]
  
Line 70: Line 14:
 
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
 
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
  
=== Issues: ===
+
[[Calc/ODFF_Implementation/Examine_functions|ODFF and accuracy problems in statitistic functions]]
This function is expected for OOo3.1
+
  
__NOTOC__
+
[[Calc/Drafts/Treatment_of_new_Excel_2010_functions|Treatment of new Excel 2010 functions]]
  
== CHISQINV ==
+
=== Planning Wiki-Pages ===
Calculates the inverse of the CHISQDIST function.
+
[[/MyDrafts]] new document on ''Precision and Accuracy''
  
=== Syntax ===
+
[[/MYDrafts2]] new specification for print ranges
<tt>'''CHISQINV(p; k)'''</tt>
+
: <tt>'''k'''</tt> is the degrees of freedom for the &chi;<sup>2</sup>-distribution.
+
  
:: Constraint: k must be a positive integer
+
[[/MYDrafts3]] TTEST
  
: <tt>'''p'''</tt> is the given probability
+
[[/MYDrafts4]] Angle problems in ODF 1.2
  
:: Constraint: 0 &le; p < 1
+
[[/ComparisonWriterDrawPicture]] Comparison between Writer- and Draw-picture
  
=== Semantic ===
+
[[/MYDrafts5]] Custom Shapes
  
: <tt>'''CHISQINV(p; k)'''</tt> returns the value <tt>'''x'''</tt>, such that <tt>'''CHISQDIST(x; k;TRUE())''' = '''p'''</tt>.
+
=== Development ===
 +
Currently: Adding more font colors to Math [[/MYDrafts6]] Colors in Math
  
=== Example ===
+
== Sandbox ==
<tt>'''CHISQINV(0.5; 9)'''</tt>
+
=== math tests ===
: returns approximately 8.342832692
+
.
+
  
=== Remarks ===
+
[[http://meta.wikimedia.org/wiki/Help:Formula]]
If you need <tt>CHISQINV(p;k)</tt> for a non interger parameter k, then use <tt>GAMMAINV(p;k/2;2)</tt> instead.
+
  
=== See also: ===
+
Test Wiki-markup here
[[Documentation/How_Tos/Calc: CHISQDIST function|'''CHISQDIST''']]
+
[[Documentation/How_Tos/Calc: CHIDIST function|'''CHIDIST''']]
+
[[Documentation/How_Tos/Calc: CHIINV function|'''CHIINV''']]
+
  
[[Documentation/How_Tos/Calc: Statistical functions|'''Statistical functions''']]
+
<math>\sum_{k=1}^N k \pm i</math>
  
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
+
<math>a - b </math>
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
+
  
=== Issues: ===
+
<math>a + b</math>
* This function is expected for OOo3.1
+
 
+
 
+
== GAMMA ==
+
Returns the values of the Gamma function.
+
 
+
=== Syntax ===
+
<tt>'''GAMMA(x)'''</tt>
+
 
+
:<tt>'''x'''</tt> is a number.
+
 
+
:: Constraint: If x is an integer, then x must be positive.
+
 
+
=== Semantic ===
+
<tt>'''GAMMA(x)'''</tt> calculates
+
: <math>\Gamma(x) = \int_0^\infty t^{x-1} \mathrm e^{- t} \mathrm d t \,\!</math>.
+
 
+
 
+
 
+
=== Example ===
+
: <tt>'''GAMMA(4) = 6.0'''</tt> exact
+
: <tt>'''GAMMA(34.56)''' &asymp; 6.2336323276E+037</tt>
+
: <tt>'''GAMMA(&minus;4)'''</tt> not defined
+
 
+
=== Remarks ===
+
For x &lt; 0.5 Eulers reflection formula is used.
+
 
+
The Gamma function has poles for negative integers and for zero. Near the poles the values are less accurate.
+
 
+
If x is a positive integer, then
+
: <math>\displaystyle \Gamma(x)=(x-1)\mathrm ! </math>
+
But be aware, that OpenOffice.org has only a precision of 15 digits, therefore the results for x &gt; 21 are rounded.
+
 
+
=== See also: ===
+
[[Documentation/How_Tos/Calc: GAMMADIST function|'''GAMMALN''']],
+
[[Documentation/How_Tos/Calc: GAMMAINV function|'''GAMMADIST''']],
+
[[Documentation/How_Tos/Calc: GAMMAINV function|'''GAMMAINV''']],
+
[[Documentation/How_Tos/Calc: GAMMAINV function|'''FACT''']]
+
 
+
[[Documentation/How_Tos/Calc: Mathematical functions|'''Mathematical functions''']]
+
 
+
[[Documentation/How_Tos/Calc: Statistical functions|'''Statistical functions''']]
+
 
+
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
+
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
+
  
=== Issues: ===
+
<math>{a \pm b}</math>
This function is expected for OOo3.1.
+
  
== Accuracy ==
+
<nowiki><math>\sum_{k=1}^N k^2</math></nowiki>
 +
<math>\sum_{k=1}^N k^2</math>
  
=== Precision in Calc ===
+
<math>\scriptstyle \sqrt {n-1}</math> <nowiki> <math>\scriptstyle \sqrt {n-1}</math> </nowiki>
  
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 <tt>0.00000000000000E+000</tt>. 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 <math>\scriptstyle -2^{53} \ldots 2^{53}</math> can be represented exactly in the internal format.
+
<math>\sqrt {n-1}</math> <nowiki><math>\sqrt {n-1}</math> </nowiki>
  
Although you can force Calc to show 15 decimal digits, these might not be all accurate. This article lists some of the problems.
+
<math> s_{X_1 - X_2}</math> <nowiki><math> s_{X_1 - X_2}</math> </nowiki>
  
=== Cancellation ===
+
<math>1-P( -|z| \le Z \le |z|)</math> <nowiki> <math>1-P( -|z| \le Z \le |z|)</math> </nowiki>
  
If you subtract two non integer numbers, which have nearly the same value, the result has less significant digits then the initial values.
+
<math>\textstyle \sum_{k=1}^N k^2</math> <nowiki> <math>\textstyle \sum_{k=1}^N k^2</math> </nowiki>
{| class="wikitable"
+
|-
+
! !! 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 <math>\scriptstyle 0.999411764795882-1699/1700</math>, calculated with a computer algebra system with high precision.
+
<math>\sum_{k=1}^N k^2</math> <nowiki> <math>\sum_{k=1}^N k^2</math> </nowiki>
  
=== Converting Inaccuracy ===
+
<math>\int_{1}^{3}\frac{e^3/x}{x^2}\, dx</math> <nowiki> <math>\int_{1}^{3}\frac{e^3/x}{x^2}\, dx</math> </nowiki>
  
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.
+
<nowiki><math>\sum_{k=1}^N k^2</math></nowiki>
 +
<math>\sum_{k=1}^N k^2</math>
  
{| class="wikitable"
+
<math>\frac{1}{N} \sum_{k=2}^N k^2</math>
|-
+
<nowiki><math>\frac{1}{N} \sum_{k=2}^N k^2</math></nowiki>
! !! A !! B !! C
+
|-
+
! 1
+
| 0.99999876543210000000 || =0.99999876543210000000 ||
+
|-
+
! 2
+
| 0.00000123456790002141 || =1-A1 || 
+
|-
+
! 3
+
|  ||  ||
+
|-
+
! 4
+
|  ||  ||
+
|}
+
  
=== No Symbolic &pi; ===
+
<math>\frac{1} {n} \sum_{i} {(x_i - \bar x)(y_i - \bar y)}</math>
 +
<nowiki>\frac{1} {n} \sum_{i} {(x_i - \bar x)(y_i - \bar y)}</math></nowiki>
  
Mathematically the equation <tt>sin(&pi;) = 0</tt> holds and <tt> tan(&pi; /2)</tt> is undefined. But you cannot get this in Calc, because the value &pi; is always treated as rounded floating point number. It makes no difference using <tt>PI()</tt> or <tt>RADIANDS(180)</tt>. Calc cannot evaluate &pi; symbolically as computer algebra systems do. That is no special limitation of Calc, but other often used spreadsheet applications work only numerically too.
+
=== dashboard ===
{| class="wikitable"
+
|-
+
! !! A !! B !! C
+
|-
+
! 1
+
| 1.63317787283838E+016 || =TAN(PI()/2) ||
+
|-
+
! 2
+
| 1.22460635382238E-016 || =SIN(RADIANS(180)) || 
+
|-
+
! 3
+
|  ||  ||
+
|}
+

Latest revision as of 11:38, 23 October 2014

native language
German
active in project
de, qa, sc, graphics, LibreOffice, Apache OpenOffice
user name
regina
special interest
www.ooowiki.de
email
rb.henschel@t-online.de

Anleitung

ToDo

Working on functions sides

Statistical functions

Functions listed alphabetically, Functions listed by category

ODFF and accuracy problems in statitistic functions

Treatment of new Excel 2010 functions

Planning Wiki-Pages

/MyDrafts new document on Precision and Accuracy

/MYDrafts2 new specification for print ranges

/MYDrafts3 TTEST

/MYDrafts4 Angle problems in ODF 1.2

/ComparisonWriterDrawPicture Comparison between Writer- and Draw-picture

/MYDrafts5 Custom Shapes

Development

Currently: Adding more font colors to Math /MYDrafts6 Colors in Math

Sandbox

math tests

[[1]]

Test Wiki-markup here

<math>\sum_{k=1}^N k^2</math>

<math>\scriptstyle \sqrt {n-1}</math>

<math>\sqrt {n-1}</math>

<math> s_{X_1 - X_2}</math>

<math>1-P( -|z| \le Z \le |z|)</math>

<math>\textstyle \sum_{k=1}^N k^2</math>

<math>\sum_{k=1}^N k^2</math>

<math>\int_{1}^{3}\frac{e^3/x}{x^2}\, dx</math>

<math>\sum_{k=1}^N k^2</math>

<math>\frac{1}{N} \sum_{k=2}^N k^2</math>

\frac{1} {n} \sum_{i} {(x_i - \bar x)(y_i - \bar y)}</math>

dashboard

Personal tools