Difference between revisions of "Documentation/How Tos/Calc: ZTEST function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(→Issues:: added issue number) |
(→Syntax:) |
||
Line 6: | Line 6: | ||
=== Syntax: === | === Syntax: === | ||
<tt>'''ZTEST(data; μ σ)'''</tt> | <tt>'''ZTEST(data; μ σ)'''</tt> | ||
− | : <tt>'''data'''</tt> is a range or array | + | : <tt>'''data'''</tt> is a range or array containing a random sample from a population (population assumed to have a normal distribution). |
: <tt>'''μ'''</tt> is the (known) mean of the population. | : <tt>'''μ'''</tt> is the (known) mean of the population. | ||
Line 12: | Line 12: | ||
: <tt>'''σ'''</tt> is the (known) standard deviation of the population. If omitted, it is estimated from the sample data by <tt>'''STDEV(data)'''</tt>. | : <tt>'''σ'''</tt> is the (known) standard deviation of the population. If omitted, it is estimated from the sample data by <tt>'''STDEV(data)'''</tt>. | ||
− | : <tt>'''ZTEST'''</tt> calculates the z statistic | + | : <tt>'''ZTEST'''</tt> calculates the z statistic: |
:: [[Image:Calc_z_formula.png]] | :: [[Image:Calc_z_formula.png]] | ||
− | : and | + | : where ''m'' is the sample mean and ''n'' the number in the sample. Where the mean and standard deviation of the population are known, the z statistic forms a standard normal distribution - that is, a normal distribution with mean=0 and standard deviation=1. <tt>'''ZTEST'''</tt> returns the one-sided cumulative probability. |
=== Example: === | === Example: === |
Revision as of 07:50, 20 July 2008
ZTEST
Returns the result of a z-test.
Syntax:
ZTEST(data; μ σ)
- data is a range or array containing a random sample from a population (population assumed to have a normal distribution).
- μ is the (known) mean of the population.
- σ is the (known) standard deviation of the population. If omitted, it is estimated from the sample data by STDEV(data).
- where m is the sample mean and n the number in the sample. Where the mean and standard deviation of the population are known, the z statistic forms a standard normal distribution - that is, a normal distribution with mean=0 and standard deviation=1. ZTEST returns the one-sided cumulative probability.
Example:
ZTEST(A2:A20; 9; 2)
- returns the result of a z-test on a sample A2:A20 drawn from a population with known mean 9 and known standard deviation 2.
See also:
Issues:
- The validity of this measure is not clear; see for example the draft ODFF standard 16May08, and that Excel has referred to this as both a one-tailed and a two-tailed test.
- Calc and Excel produce different results for the 3 parameter version of this function. Excel calculates 1 - NORMSDIST(z). See issue 90759.