sampsizepwr
Sample size and power of test
Syntax
Description
sampsizepwr
computes the sample
size, power, or alternative parameter value for a hypothesis test,
given the other two values. For example, you can compute the sample
size required to obtain a particular power for a hypothesis test,
given the parameter value of the alternative hypothesis.
returns the sample size, nout
= sampsizepwr(testtype
,p0
,p1
)nout
, required for a two-sided
test of the type specified by testtype
to have a power
(probability of rejecting the null hypothesis when the alternative hypothesis is
true) of 0.90 when the significance level (probability of rejecting the null
hypothesis when the null hypothesis is true) is 0.05. p0
specifies parameter values under the null hypothesis. p1
specifies the value, or an array of values, of the single parameter being tested
under the alternative hypothesis.
___ = sampsizepwr(
returns any of the previous arguments using one or more name-value pair
arguments. For example, you can change the significance level of the test, or
specify a right- or left-tailed test. The name-value pairs can appear in any
order but must begin in the sixth argument position.testtype
,p0
,p1
,pwr
,n
,Name,Value
)
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2006b