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

From Apache OpenOffice Wiki
Jump to: navigation, search
(Blanked the page)
(Undo revision 219933 by Javier Lopez (talk))
Line 1: Line 1:
 +
{{Documentation/MasterTOC
 +
|bookid=1234'''
 +
|booktitle=<div style="padding: 8px; font-size: 140%; font-weight: bold; background-color: #9BC0F5;">CALC FUNCTIONS</div>
 +
|ShowParttitle=block|parttitle=[[Documentation/How_Tos/Calc:_Database_functions|<div  style="font-size: 140%;">Database Functions]]
 +
|ShowNextPage=block|NextPage= Documentation/How_Tos/Calc:_Date_%26_Time_functions
 +
|ShowPrevPage=block|PrevPage= Documentation/How_Tos/Calc:_DVAR_function
 +
|ShowPrevPart=block|PrevPart= Documentation/How_Tos/Calc:_Complex_Number_functions
 +
|ShowNextPart=block|NextPart= Documentation/How_Tos/Calc:_Date_%26_Time_functions
 +
|toccontent= <div style="padding: 4px; font-size: 130%; font-weight: hidden; background-color:#DCE9FC;">FUNCTIONS</div>
 +
* [[Documentation/How_Tos/Calc:_DCOUNT_function|<div style="font-size: 120%;">Dcount]]
 +
* [[Documentation/How_Tos/Calc:_DCOUNTA_function|<div style="font-size: 120%;">Dcounta]]
 +
* [[Documentation/How_Tos/Calc:_DGET_function|<div style="font-size: 120%;">Dget]]
 +
* [[Documentation/How_Tos/Calc:_DMAX_function|<div style="font-size: 120%;">Dmax]]
 +
* [[Documentation/How_Tos/Calc:_DMIN_function|<div style="font-size: 120%;">Dmin]]
 +
* [[Documentation/How_Tos/Calc:_DAVERAGE_function|<div style="font-size: 120%;">Daverage]]
 +
* [[Documentation/How_Tos/Calc:_DPRODUCT_function|<div style="font-size: 120%;">Dproduct]]
 +
* [[Documentation/How_Tos/Calc:_DSTDEV_function|<div style="font-size: 120%;">Dstdev]]
 +
* [[Documentation/How_Tos/Calc:_DSUM_function|<div style="font-size: 120%;">Dsum]]
 +
* [[Documentation/How_Tos/Calc:_DVAR_function|<div style="font-size: 120%;">Dvar]]
 +
* [[Documentation/How_Tos/Calc:_DVARP_function|<div style="font-size: 120%; border-style: double; border-color:#778899;">Dvarp]]
 +
}}__TOC__
  
 +
== DVARP  ==
 +
Returns the population variance of values in a column of a Calc 'database' table, in rows which meet specified criteria.
 +
 +
 +
=== Syntax: ===
 +
<tt>'''DVARP(database_table; field; criteria_table)'''</tt>
 +
 +
where
 +
 +
:<tt>'''database_table'''</tt> is a range defining the data to be examined.
 +
 +
:<tt>'''field'''</tt> is the column to examine. It may be a column number (1 is the first column of the database table, 2 is the second ...) or a column header (enclosed in quotation marks ””) or a cell referring to a column header.
 +
 +
:<tt>'''criteria_table'''</tt> is a range containing criteria, which are used to select which rows of the <tt>'''database_table'''</tt> to examine.
 +
 +
 +
:The [[Documentation/How_Tos/Calc: Database functions|Database functions overview]] describes these parameters in detail.
 +
 +
 +
<tt>'''DVARP'''</tt> returns the '''population variance''', which assumes that the chosen rows of the <tt>'''database_table'''</tt> are an entire normally distributed population. If the chosen data are a sample of the population, use '''<tt>* [[Documentation/How_Tos/Calc: DVARP function|DVARP]]</tt>''' instead. The <tt>'''DVARP'''</tt> calculation uses this formula:
 +
 +
<center>[[Image:Calc_pop_var_formula.png]]</center>
 +
 +
where N is the number of values included and x<sub>i</sub> are those values.
 +
 +
 +
<tt>'''DVARP'''</tt> ignores any cell containing text in the <tt>'''field'''</tt> column.
 +
 +
 +
Simply put, variance is a measure of how widely spread data values are. It is the square of the <i>standard deviation</i> (see '''<tt>* [[Documentation/How_Tos/Calc: DSTDEV function|DSTDEV]]</tt>''', '''<tt>* [[Documentation/How_Tos/Calc: DSTDEVP function|DSTDEVP]]</tt>'''). Variance is a reliable measure only if there is enough data to examine.
 +
 +
 +
=== Example: ===
 +
 +
In this spreadsheet:
 +
 +
{| border="1"
 +
|-align="center"
 +
|&nbsp;||'''A'''||'''B'''||'''C'''||'''D'''||'''E'''
 +
 +
|-align="center"
 +
|'''1'''||Name||Grade||Age||Distance to School||Weight
 +
 +
|-align="center"
 +
|'''2'''||Andy||3||9||150||40
 +
 +
|-align="center"
 +
|'''3'''||Betty||4||10||1000||42
 +
 +
|-align="center"
 +
|'''4'''||Charles||3||10||300||51
 +
 +
|-align="center"
 +
|'''5'''||Daniel||5||11||1200||48
 +
 +
|-align="center"
 +
|'''6'''||Eva||2||8||650||33
 +
 +
|-align="center"
 +
|'''7'''||Frank||2||7||300||42
 +
 +
|-align="center"
 +
|'''8'''||Greta||1||7||200||36
 +
 +
|-align="center"
 +
|'''9'''||Harry||3||9||1200||44
 +
 +
|-align="center"
 +
|'''10'''||Irene||2||8||1000||42
 +
 +
|-align="center"
 +
|'''11'''||&nbsp;||&nbsp;||&nbsp;||&nbsp;||&nbsp;
 +
 +
|-align="center"
 +
|'''12'''||&nbsp;||&nbsp;||&nbsp;||&nbsp;||&nbsp;
 +
 +
|-align="center"
 +
|'''13'''||Name||Grade||Age||Distance to School||Weight
 +
 +
|-align="center"
 +
|'''14'''||&nbsp;||2||&nbsp;||&nbsp;||&nbsp;
 +
 +
|}
 +
 +
 +
<tt>'''DVARP(A1:E10; "Weight"; A13:E14)'''</tt>
 +
 +
: returns the population variance of the weights of children in the second grade. This is not a useful measure, as there are so few children.
 +
 +
===Issues:===
 +
* The OOo2.3 Help implies that <tt>'''0'''</tt> as a <tt>'''field'''</tt> will include the entire database table. This seems to be wrong - only the variance of a single column can be found.
 +
 +
* Logical values TRUE and FALSE are interpreted as 1 and 0 in the calculation. This is not compatible with Excel, which ignores logical values. This will very rarely cause difficulty.
 +
 +
 +
 +
{{Documentation/SeeAlso|
 +
* [[Documentation/How_Tos/Calc: DCOUNT function|DCOUNT]]
 +
* [[Documentation/How_Tos/Calc: DCOUNTA function|DCOUNTA]]
 +
* [[Documentation/How_Tos/Calc: DSUM function|DSUM]]
 +
* [[Documentation/How_Tos/Calc: DPRODUCT function|DPRODUCT]]
 +
* [[Documentation/How_Tos/Calc: DMAX function|DMAX]]
 +
* [[Documentation/How_Tos/Calc: DMIN function|DMIN]]
 +
* [[Documentation/How_Tos/Calc: DAVERAGE function|DAVERAGE]]
 +
* [[Documentation/How_Tos/Calc: DSTDEV function|DSTDEV]]
 +
* [[Documentation/How_Tos/Calc: DSTDEVP function|DSTDEVP]]
 +
* [[Documentation/How_Tos/Calc: DVAR function|DVAR]]
 +
* [[Documentation/How_Tos/Calc: DGET function|DGET]]
 +
* [[Documentation/How_Tos/Calc: VAR function|VAR]]
 +
* [[Documentation/How_Tos/Calc: VARP function|VARP]]
 +
* [[Documentation/How_Tos/Calc: Database functions#Overview|Database functions overview]]
 +
* [[Documentation/How_Tos/Calc: Database functions|Database functions]]
 +
* [[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/Database functions]]

Revision as of 04:10, 9 May 2013


DVARP

Returns the population variance of values in a column of a Calc 'database' table, in rows which meet specified criteria.


Syntax:

DVARP(database_table; field; criteria_table)

where

database_table is a range defining the data to be examined.
field is the column to examine. It may be a column number (1 is the first column of the database table, 2 is the second ...) or a column header (enclosed in quotation marks ””) or a cell referring to a column header.
criteria_table is a range containing criteria, which are used to select which rows of the database_table to examine.


The Database functions overview describes these parameters in detail.


DVARP returns the population variance, which assumes that the chosen rows of the database_table are an entire normally distributed population. If the chosen data are a sample of the population, use * DVARP instead. The DVARP calculation uses this formula:

Calc pop var formula.png

where N is the number of values included and xi are those values.


DVARP ignores any cell containing text in the field column.


Simply put, variance is a measure of how widely spread data values are. It is the square of the standard deviation (see * DSTDEV, * DSTDEVP). Variance is a reliable measure only if there is enough data to examine.


Example:

In this spreadsheet:

  A B C D E
1 Name Grade Age Distance to School Weight
2 Andy 3 9 150 40
3 Betty 4 10 1000 42
4 Charles 3 10 300 51
5 Daniel 5 11 1200 48
6 Eva 2 8 650 33
7 Frank 2 7 300 42
8 Greta 1 7 200 36
9 Harry 3 9 1200 44
10 Irene 2 8 1000 42
11          
12          
13 Name Grade Age Distance to School Weight
14   2      


DVARP(A1:E10; "Weight"; A13:E14)

returns the population variance of the weights of children in the second grade. This is not a useful measure, as there are so few children.

Issues:

  • The OOo2.3 Help implies that 0 as a field will include the entire database table. This seems to be wrong - only the variance of a single column can be found.
  • Logical values TRUE and FALSE are interpreted as 1 and 0 in the calculation. This is not compatible with Excel, which ignores logical values. This will very rarely cause difficulty.


Template:Documentation/SeeAlso
Retrieved from "https://wiki.openoffice.org/w/index.php?title=Documentation/How_Tos/Calc:_DVARP_function&oldid=219935"
Views
Personal tools
Navigation
Tools