<< conint_normmu Conint conint_normvar >>

Conint >> Conint > conint_normmunumber

conint_normmunumber

Number of experiments for a Normal variable.

Calling Sequence

n = conint_normmunumber ( len , v )
n = conint_normmunumber ( len , v , level )

Parameters

len :

a 1-by-1 matrix of doubles, positive, the length of the confidence interval.

v :

a 1-by-1 matrix of doubles, the variance

level :

a 1-by-1 matrix of doubles, the confidence level (default level = 1.-0.95=0.05). level is expected to be in the range [0.,0.5]

n :

a 1-by-1 matrix of doubles, integer value, the number of experiments

Description

Returns the number of experiments which guarantees that the length of the confidence interval is less than len. This two-sided confidence interval is for the expectation of the random variable and we make the assumption that the random variable has a Normal distribution.

In other words, if x is a vector with n entries, then

[ m, low, up ] = conint_normmu ( x , level , v )

is so that

abs(up-low) <= len

To compute n, we assume that the random variable has Normal distribution with known variance v.

Examples

// Sheldon Ross, EXAMPLE 7.3d, p245
// Compute the number of experiments for a random variable
// with standard deviation 0.3 so that
// the expectation has a two-sided 95% confidence interval
// with length no greater than 0.2.
n = conint_normmunumber ( 0.2 , 0.3^2 , 1.-0.95 )
// Expected: n=35

Authors

Bibliography

http://en.wikipedia.org/wiki/Confidence_interval

"Introduction to probability and statistics for engineers and scientists", Sheldon Ross, Third Edition, 2004


Report an issue
<< conint_normmu Conint conint_normvar >>