Home Libraries People FAQ More

##### 非中心F分佈(Noncentral F Distribution)

`#include <boost/math/distributions/non_central_f.hpp>`

```namespace boost{ namespace math{

template <class RealType = double,
class Policy   = policies::policy<> >
class non_central_f_distribution;

typedef non_central_f_distribution<> non_central_f;

template <class RealType, class Policy>
class non_central_f_distribution
{
public:
typedef RealType  value_type;
typedef Policy    policy_type;

// 構造函數:
non_central_f_distribution(RealType v1, RealType v2, RealType lambda);

// 自由度參數(degree of freedom)v1 & v2 訪問函數(Accessor):
RealType degrees_of_freedom1()const;
RealType degrees_of_freedom2()const;

//非中心參數( non-centrality parameter )lambda訪問函數(Accessor):
RealType non_centrality()const;
};

}} // namespaces
```

```F = (X/v1) / (Y/v2)
```

##### 函數
```non_central_f_distribution(RealType v1, RealType v2, RealType lambda);
```

```RealType degrees_of_freedom1()const;
```

```RealType degrees_of_freedom2()const;
```

```RealType non_centrality()const;
```

##### 實現

pdf

f(x;v1,v2;λ) = (v1/v2) / ((1+y)*(1+y)) * g(y/(1+y);v1/2,v2/2;λ)

y = x * v1 / v2

cdf

p = By(v1/2, v2/2; λ)

y = x * v1 / v2

cdf 補集(complement)

q = 1 - By(v1/2, v2/2; λ)

y = x * v1 / v2

x = (bx / (1-bx)) * (v1 / v2)

bx = Qp-1(v1/2, v2/2; λ)

Qp-1(v1/2, v2/2; λ)

from the complement )

x = (bx / (1-bx)) * (v1 / v2)

bx = QCq-1(v1/2, v2/2; λ)

QCq-1(v1/2, v2/2; λ)

v2 * (v1 + l) / (v1 * (v2 - 2))

Andrea van Aubel & Wolfgang Gawronski, Applied Mathematics and Computation, 141 (2003) 3-12.