Difference between revisions of "Manuals/calci/ZTEST"

From ZCubes Wiki
Jump to navigation Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''ZTEST'''</font></font></font><font color="#48484...")
 
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left"> <font color="#484848"><font face="Arial, sans-serif"><font size="2">'''ZTEST'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">(</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''ar'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">, </font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">'''p'''</font></font></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,sigma)</font></font></font>
+
<div style="font-size:30px">'''ZTEST(ar,x,sigma)'''</div><br/>
 +
*<math>ar</math> is the array of values.
 +
*<math>x</math> is the value to test.
 +
*<math>sigma</math> is the standard deviation of the population.
  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">Where 'ar' is the array or range of data, 'p' is the value to test and 'sigma' is the population (known) standard deviation. </font></font></font>
 
  
</div>
+
==Description==
----
+
*This function gives the one-tailed probability of z-test.  
<div id="1SpaceContent" class="zcontent" align="left">  <font color="#484848"><font face="Arial, sans-serif"><font size="2">This function returns the one-tailed probability-value of a z-test. </font></font></font></div>
+
*Z-test is used to determine whether two population means are different when the variances are known and the sample size is large.
----
+
*In <math>ZTEST(ar,x,sigma)</math>,<math> ar </math> is the array of values against which the hypothesized sample mean is to be tested.
<div id="7SpaceContent" class="zcontent" align="left"> 
+
*<math> x </math> is the  hypothesized sample mean, and <math>sigma</math> is the standard deviation of the population.
 
+
*When we are not giving the sigma value, it will use the standard deviation of sample.  
* <font color="#484848"><font face="Arial, sans-serif"><font size="2">ZTEST is calculated as follows when sigma is not omitted: </font></font></font>
+
*This  function returns the probability that the supplied hypothesized sample mean is greater than the mean of the supplied data values.
 
+
*The test statistic should follow a normal distribution.
<font color="#484848"></font>
+
*ZTEST is calculated when sigma is not omitted and x=μ0 : <math>ZTEST(ar,\mu_0,sigma)=1-NORMSDIST((\bar{x}-μ0)/\frac{sigma}{\sqrt{n}}</math>.
 
+
*ZTEST is calculated when sigma is omitted and x=μ0:
<font color="#484848"><font face="Arial, sans-serif"><font size="2">where 'ar' = array, '''''''p' = μ<sub>0 </sub></font></font></font>
+
<math> ZTEST(ar,μ0)=1-NORMSDIST(\bar{x}-μ0)/\frac{s}{\sqrt{n}}</math>
 
+
where <math>bar{x}</math> is sample mean , <math> s</math> is the sample deviation and <math>n</math> is the  size of the sample.  
<font color="#484848"><font face="Arial, sans-serif"><font size="2">or when sigma is omitted:</font></font></font>
+
*Suppose we want to calculate the z-test for two tailed probability then this can be done by using the Z.Test function: <math>2*MIN(ZTEST(ar,\mu_0,sigma),1-ZTEST(ar,\mu_0,sigma))</math>.  
 
+
*This function will give the result as error when
<font color="#484848"></font>
+
    1. Any one of the argument is non-numeric.
 
+
    2. ar or x is empty.
<font color="#484848"><font face="Arial, sans-serif"><font size="2">where 'ar' = array, '''''''p' =-μ<sub>0 </sub></font></font></font>
+
    3. ar contains only one value.
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2">x is the sample mean AVERAGE(ar); s is the sample standard deviation STDEV(array); and n is the number of observations in the sample COUNT(array).</font></font></font>
 
 
 
* <font color="#484848"><font face="Arial, sans-serif"><font size="2">The following formula can be used to compute the two-tailed probability that the sample mean would be further from 'p' ( μ</font></font></font><font color="#484848"><sub><font face="Arial, sans-serif"><font size="2">0</font></font></sub></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">) than AVERAGE(ar), when the underlying population mean is μ</font></font></font><font color="#484848"><sub><font face="Arial, sans-serif"><font size="2">0</font></font></sub></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">:</font></font></font>
 
 
 
<font color="#484848"><font face="Arial, sans-serif"><font size="2"><nowiki>=2 * MIN(ZTEST(array,μ</nowiki></font></font></font><font color="#484848"><sub><font face="Arial, sans-serif"><font size="2">0</font></font></sub></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,sigma), 1 - ZTEST(array,μ</font></font></font><font color="#484848"><sub><font face="Arial, sans-serif"><font size="2">0</font></font></sub></font><font color="#484848"><font face="Arial, sans-serif"><font size="2">,sigma)).</font></font></font>
 
 
 
</div>
 
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
 
 
ZTEST
 
 
 
</div></div>
 
----
 
<div id="8SpaceContent" class="zcontent" align="left">
 
 
 
<nowiki>=ZTEST(B2:B8,4) is 0.0025</nowiki>
 
 
 
<nowiki>=2*MIN(ZTEST(B2:B8,4),1-ZTEST(B2:B8,4)) is 0.005 </nowiki>
 
 
 
<nowiki>=ZTEST(B2:B8,6) is 0.427 </nowiki>
 
 
 
<nowiki>=2*MIN(ZTEST(B2:B8,6),1-ZTEST(B2:B8,6)) is 0.8451 </nowiki>
 
 
 
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="2SpaceContent" class="zcontent" align="left">
 
 
 
{| id="TABLE3" class="SpreadSheet blue"
 
|- class="even"
 
| class=" " |
 
| class="  " | Column1
 
| class="  " | Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| class="sshl_f" | 5
 
| class="sshl_f" | 0.002491
 
| 4
 
| class="sshl_f" | 5
 
|- class="even"
 
| class="  " | Row2
 
| class="sshl_f" | 7
 
| class="sshl_f" | 0.004982
 
| 9
 
| class="sshl_f" | 128
 
|- class="odd"
 
| Row3
 
| class="sshl_f" | 9
 
| class="sshl_f" | 0.427068
 
| 14
 
| class="sshl_f    " | 15
 
|- class="even"
 
| Row4
 
| class="sshl_f" | 8
 
| class="sshl_f" | 0.854136
 
| class="sshl_f" | 10000
 
| class="  " | 20
 
|- class="odd"
 
| class="sshl_f" | Row5
 
| class="sshl_f" | 6
 
| class="sshl_f SelectTD ChangeBGColor SelectTD" |
 
| class="sshl_f" |
 
| class="sshl_f" |
 
|- class="even"
 
| class="sshl_f" | Row6
 
| class="sshl_f" | 5
 
| 1.286186
 
| 27
 
| 40
 
|- class="odd"
 
| class="sshl_f" | Row7
 
| class="sshl_f" | 3
 
| 0.850904
 
| 1.619775
 
| 0.525322
 
|}
 
 
 
<div align="left">[[Image:calci1.gif]]</div></div>
 
----
 

Revision as of 22:39, 9 February 2014

ZTEST(ar,x,sigma)


  • is the array of values.
  • is the value to test.
  • is the standard deviation of the population.


Description

  • This function gives the one-tailed probability of z-test.
  • Z-test is used to determine whether two population means are different when the variances are known and the sample size is large.
  • In , is the array of values against which the hypothesized sample mean is to be tested.
  • is the hypothesized sample mean, and is the standard deviation of the population.
  • When we are not giving the sigma value, it will use the standard deviation of sample.
  • This function returns the probability that the supplied hypothesized sample mean is greater than the mean of the supplied data values.
  • The test statistic should follow a normal distribution.
  • ZTEST is calculated when sigma is not omitted and x=μ0 : Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle ZTEST(ar,\mu_0,sigma)=1-NORMSDIST((\bar{x}-μ0)/\frac{sigma}{\sqrt{n}}} .
  • ZTEST is calculated when sigma is omitted and x=μ0:

Failed to parse (syntax error): {\displaystyle ZTEST(ar,μ0)=1-NORMSDIST(\bar{x}-μ0)/\frac{s}{\sqrt{n}}} where is sample mean , is the sample deviation and is the size of the sample.

  • Suppose we want to calculate the z-test for two tailed probability then this can be done by using the Z.Test function: .
  • This function will give the result as error when
    1. Any one of the argument is non-numeric.
    2. ar or x is empty.
    3. ar contains only one value.