Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

*z*-test

`h = ztest(x,m,sigma)`

`h= ztest(x,m,sigma,Name,Value)`

```
[h,p] =
ztest(___)
```

```
[h,p,ci,zval]
= ztest(___)
```

returns
a test decision for the null hypothesis that the data in the vector `h`

= ztest(`x`

,`m`

,`sigma`

)`x`

comes
from a normal distribution with mean `m`

and a
standard deviation `sigma`

, using the *z*-test.
The alternative hypothesis is that the mean is not `m`

.
The result `h`

is `1`

if the test
rejects the null hypothesis at the 5% significance level, and `0`

otherwise.

returns
a test decision for the `h`

= ztest(`x`

,`m`

,`sigma`

,`Name,Value`

)*z*-test with additional
options specified by one or more name-value pair arguments. For example,
you can change the significance level or conduct a one-sided test.

Use

`sampsizepwr`

to calculate:The sample size that corresponds to specified power and parameter values;

The power achieved for a particular sample size, given the true parameter value;

The parameter value detectable with the specified sample size and power.

`sampsizepwr`

| `ttest`

| `ttest2`

Was this topic helpful?