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

From Apache OpenOffice Wiki
Jump to: navigation, search
m
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{DISPLAYTITLE:BETADIST function}}
 +
{{Documentation/CalcFunc StatisticalTOC
 +
|ShowPrevNext=block
 +
|PrevPage=Documentation/How_Tos/Calc:_B_function
 +
|NextPage=Documentation/How_Tos/Calc:_BETAINV_function
 +
}}__NOTOC__
  
 
== BETADIST ==
 
== BETADIST ==
Line 8: Line 13:
  
 
The beta distribution is a family of continuous probability distributions, where <tt>'''α'''</tt> and <tt>'''β'''</tt> are parameters controlling the shape of the distribution.
 
The beta distribution is a family of continuous probability distributions, where <tt>'''α'''</tt> and <tt>'''β'''</tt> are parameters controlling the shape of the distribution.
 +
 +
<tt>'''x'''</tt> is the number, at which you will evaluate the Beta distribution.
  
 
The parameters <tt>'''a'''</tt> and <tt>'''b'''</tt> are lower and upper bounds of the distribution. You can interpret the value a as ''location'' and the value b&minus;a as ''scale''.  
 
The parameters <tt>'''a'''</tt> and <tt>'''b'''</tt> are lower and upper bounds of the distribution. You can interpret the value a as ''location'' and the value b&minus;a as ''scale''.  
Line 13: Line 20:
 
<tt>'''a'''</tt> and <tt>'''b'''</tt> are optional parameters which default (if omitted) to <tt>'''0'''</tt> and <tt>'''1'''</tt>.
 
<tt>'''a'''</tt> and <tt>'''b'''</tt> are optional parameters which default (if omitted) to <tt>'''0'''</tt> and <tt>'''1'''</tt>.
  
<tt>'''cumulative'''</tt> is an optional parameter which defaults to TRUE() if omitted.
+
<tt>'''cumulative'''</tt> is an optional, logical parameter which defaults to TRUE() if omitted.
  
 
Before OOo version 3.1 the parameter ''cumulative'' doesn't exist and only the cumulative probability function is calculated.
 
Before OOo version 3.1 the parameter ''cumulative'' doesn't exist and only the cumulative probability function is calculated.
Line 19: Line 26:
 
Constraints:
 
Constraints:
 
# &alpha; &gt; 0 , &beta; &gt; 0 , a &lt; b
 
# &alpha; &gt; 0 , &beta; &gt; 0 , a &lt; b
# If &alpha; &lt; 1, than the density function has a pole at x = a.
+
# If &alpha; &lt; 1, then the density function has a pole at x = a.
# If &beta; &lt; 1, than the density function has a pole at x = b.
+
# If &beta; &lt; 1, then the density function has a pole at x = b.
  
 
=== Semantic ===
 
=== Semantic ===
Line 48: Line 55:
  
 
=== Example ===
 
=== Example ===
[[Image:BetaDistributionDensityLocationScale.png|Graphs of Beta distribution density functions using parameter a and b]]
+
{|
 
+
|<tt>'''BETADIST(1;5;3;-2;4;FALSE())</tt>
<tt>'''BETADIST(1;5;3;-2;4;FALSE())</tt>
+
 
: returns approximately 0.273
 
: returns approximately 0.273
 +
|[[Image:BetaDistributionDensityLocationScale.png|Graphs of Beta distribution density functions using parameter a and b]]
 +
|}
  
[[Image:BetaDistributionDensityNormal.png|Graphs of Beta distribution density functions with borders 0 and 1]]
+
{|
 
+
|<tt>'''BETADIST(0.2;0.7;4;0;1;FALSE())</tt>
<tt>'''BETADIST(0.2;0.7;4;0;1;FALSE())</tt>
+
 
: returns approximately 1.644
 
: returns approximately 1.644
 +
|[[Image:BetaDistributionDensityNormal.png|Graphs of Beta distribution density functions with borders 0 and 1]]
 +
|}
  
[[Image:BetaDistributionDensitySpecial.png|Graphs of Beta distribution density functions with alpha=1]]
 
  
<tt>'''BETADIST(1;1;0.5;0;1;FALSE())</tt>
+
{|
: returns ''illegal argument'' because there is a pole
+
|<tt>'''BETADIST(1;1;0.5;0;1;FALSE())</tt>
 +
: returns ''Invalid argument'' because there is a pole
  
 
<tt>'''BETADIST(1.1;1;0.5;0;1;FALSE())</tt>
 
<tt>'''BETADIST(1.1;1;0.5;0;1;FALSE())</tt>
 
: returns 0
 
: returns 0
 +
|[[Image:BetaDistributionDensitySpecial.png|Graphs of Beta distribution density functions with alpha=1]]
 +
|}
 +
 +
{|
 +
|<tt>'''BETADIST(1;5;3;-2;4;TRUE())</tt>
 +
: returns approximately 0.227
 +
call before version 3.1: <tt>'''BETADIST(1;5;3;-2;4)</tt>
 +
|[[Image:BetaDistributionCumulativeLocationScale.png|Graphs of Beta distribution cumulative functions using parameter a and b]]
 +
|}
 +
 +
{|
 +
|<tt>'''BETADIST(0.2;0.7;4;0;1;TRUE())</tt>
 +
: returns approximately 0.718
 +
call before version 3.1: <tt>'''BETADIST(0.2;0.7:4;0;1)</tt>
 +
 +
other valid call: <tt>'''BETADIST(0.2;0.7;4)</tt>
 +
|[[Image:BetaDistributionCumulativeNormal.png|Graphs of Beta distribution cumulative functions with borders 0 and 1]]
 +
|}
 +
 +
{|
 +
|<tt>'''BETADIST(1.1;1;0.5;0;1;TRUE())</tt>
 +
: returns 1
 +
before version 3.1: <tt>'''BETADIST(1.1;1;0.5;0;1)</tt>
 +
: returns ''Invalid argument''
 +
|[[Image:BetaDistributionCumulativeSpecial.png|Graphs of Beta distribution cumulative functions with alpha=1]]
 +
|}
  
=== See also ===
+
{{SeeAlso|EN|
[[Documentation/How_Tos/Calc: BETAINV function|'''BETAINV''']]
+
* [[Documentation/How_Tos/Calc: BETAINV function|BETAINV]]
  
[[Documentation/How_Tos/Calc: Statistical functions|'''Statistical 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 alphabetically|Functions listed alphabetically]]
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
+
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]
 +
}}
 +
[[Category: Documentation/Reference/Calc/Statistical functions]]

Latest revision as of 13:39, 2 February 2024



BETADIST

Calculates the cumulative distribution function or the probability density function of a beta distribution.

Syntax

BETADIST(x; α; β; a; b; cumulative)

The beta distribution is a family of continuous probability distributions, where α and β are parameters controlling the shape of the distribution.

x is the number, at which you will evaluate the Beta distribution.

The parameters a and b are lower and upper bounds of the distribution. You can interpret the value a as location and the value b−a as scale.

a and b are optional parameters which default (if omitted) to 0 and 1.

cumulative is an optional, logical parameter which defaults to TRUE() if omitted.

Before OOo version 3.1 the parameter cumulative doesn't exist and only the cumulative probability function is calculated.

Constraints:

  1. α > 0 , β > 0 , a < b
  2. If α < 1, then the density function has a pole at x = a.
  3. If β < 1, then the density function has a pole at x = b.

Semantic

For cumulative = FALSE() the function BETADIST calculates the probability density function (besides the constraints given above):

For cumulative = TRUE() the function BETADIST calculates the cumulative distribution function:

Notice, that

where

and is the regularized incomplete Beta function.

Example

BETADIST(1;5;3;-2;4;FALSE())
returns approximately 0.273
Graphs of Beta distribution density functions using parameter a and b
BETADIST(0.2;0.7;4;0;1;FALSE())
returns approximately 1.644
Graphs of Beta distribution density functions with borders 0 and 1


BETADIST(1;1;0.5;0;1;FALSE())
returns Invalid argument because there is a pole

BETADIST(1.1;1;0.5;0;1;FALSE())

returns 0
Graphs of Beta distribution density functions with alpha=1
BETADIST(1;5;3;-2;4;TRUE())
returns approximately 0.227

call before version 3.1: BETADIST(1;5;3;-2;4)

Graphs of Beta distribution cumulative functions using parameter a and b
BETADIST(0.2;0.7;4;0;1;TRUE())
returns approximately 0.718

call before version 3.1: BETADIST(0.2;0.7:4;0;1)

other valid call: BETADIST(0.2;0.7;4)

Graphs of Beta distribution cumulative functions with borders 0 and 1
BETADIST(1.1;1;0.5;0;1;TRUE())
returns 1

before version 3.1: BETADIST(1.1;1;0.5;0;1)

returns Invalid argument
Graphs of Beta distribution cumulative functions with alpha=1



See Also
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_BETADIST_function&oldid=260033"
Views
Personal tools
Navigation
Tools