主要内容

ncfstat

Noncentral F mean and variance

Description

m = ncfstat(nu1,nu2,delta) returns the mean for the noncentral F distribution with nu1 numerator degrees of freedom, nu2 denominator degrees of freedom, and the noncentrality parameter delta.

[m,v] = ncfstat(nu1,nu2,delta) also returns the variance for the distribution.

example

Examples

collapse all

Compute the mean and variance of a noncentral F distribution with nu1 numerator degrees of freedom, nu2 denominator degrees of freedom, and the noncentrality parameter delta.

nu1 = 2;
nu2 = 5;
delta = 3;
[mean,variance] = ncfstat(nu1,nu2,delta)
mean = 
4.1667
variance = 
68.0556

Input Arguments

collapse all

Numerator degrees of freedom, specified as a positive scalar or an array of positive scalars. If one or more of the input arguments nu1, nu2, and delta are arrays, then the array sizes must be the same. In this case, ncfstat expands each scalar input into a constant array of the same size as the array inputs.

Data Types: single | double

Denominator degrees of freedom, specified as a positive scalar or an array of positive scalars. If one or more of the input arguments nu1, nu2, and delta are arrays, then the array sizes must be the same. In this case, ncfstat expands each scalar input into a constant array of the same size as the array inputs.

Data Types: single | double

Noncentrality parameter, specified as a nonnegative scalar or an array of nonnegative scalars. If one or more of the input arguments nu1, nu2, and delta are arrays, then the array sizes must be the same. In this case, ncfstat expands each scalar input into a constant array of the same size as the array inputs.

Data Types: single | double

Output Arguments

collapse all

Mean for the noncentral F distribution, returned as a numeric scalar or an array of numeric scalars. m is the same size as nu1, nu2, and delta. Each element in m is the mean of the noncentral F distribution specified by the corresponding elements in nu1, nu2, and delta.

The mean of the noncentral F distribution with parameters ν1, ν2, and δ is

ν2(δ+ν1)ν1(ν22)

where ν2 > 2.

Variance for the noncentral F distribution, returned as a numeric scalar or an array of numeric scalars. v is the same size as nu1, nu2, and delta. Each element in v is the variance of the noncentral F distribution specified by the corresponding elements in nu1, nu2, and delta.

The variance of the noncentral F distribution with parameters ν1, ν2, and δ is

2(ν2ν1)2[(δ+ν1)2+(2δ+ν1)(ν22)(ν22)2(ν24)]

where ν2 > 4.

References

[1] Evans, M., N. Hastings, and B. Peacock. Statistical Distributions. 2nd ed., Hoboken, NJ: John Wiley & Sons, Inc., 1993, pp. 73–74.

[2] Johnson, N., and S. Kotz. Distributions in Statistics: Continuous Univariate Distributions-2. Hoboken, NJ: John Wiley & Sons, Inc., 1970, pp. 189–200.

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced before R2006a