Class FDistribution
java.lang.Object
cloud.opencode.base.math.distribution.FDistribution
Immutable F-distribution (Fisher-Snedecor distribution).
不可变 F 分布(Fisher-Snedecor 分布)
Provides PDF, CDF, and inverse CDF (quantile function). Thread-safe: instances are immutable.
提供概率密度函数、累积分布函数和逆累积分布函数(分位函数)。 线程安全:实例不可变。
- Since:
- JDK 25, opencode-base-math V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondoublecdf(double x) Computes the cumulative distribution function (CDF) at x.doubleReturns the denominator degrees of freedom.doubleinverseCdf(double p) Computes the inverse CDF (quantile function).doubleReturns the numerator degrees of freedom.static FDistributionof(double df1, double df2) Creates an F-distribution with the specified degrees of freedom.doublepdf(double x) Computes the probability density function (PDF) at x.toString()
-
Method Details
-
of
Creates an F-distribution with the specified degrees of freedom. 创建具有指定自由度的 F 分布- Parameters:
df1- numerator degrees of freedom, must be > 0 / 分子自由度,必须 > 0df2- denominator degrees of freedom, must be > 0 / 分母自由度,必须 > 0- Returns:
- a new FDistribution instance / 新的 F 分布实例
- Throws:
IllegalArgumentException- if df1 or df2 ≤ 0 or not finite
-
numeratorDf
public double numeratorDf()Returns the numerator degrees of freedom. 返回分子自由度- Returns:
- the numerator degrees of freedom / 分子自由度
-
denominatorDf
public double denominatorDf()Returns the denominator degrees of freedom. 返回分母自由度- Returns:
- the denominator degrees of freedom / 分母自由度
-
pdf
public double pdf(double x) Computes the probability density function (PDF) at x. 计算在 x 处的概率密度函数值- Parameters:
x- the point at which to evaluate the PDF / 计算 PDF 的点- Returns:
- the density at x / x 处的密度值
-
cdf
public double cdf(double x) Computes the cumulative distribution function (CDF) at x. 计算在 x 处的累积分布函数值F(x) = I(df1*x/(df1*x+df2), df1/2, df2/2) where I is the regularized incomplete beta function.
- Parameters:
x- the point at which to evaluate the CDF / 计算 CDF 的点- Returns:
- the cumulative probability P(X ≤ x) / 累积概率
-
inverseCdf
public double inverseCdf(double p) Computes the inverse CDF (quantile function). 计算逆累积分布函数(分位函数)- Parameters:
p- the cumulative probability, must be in (0, 1) / 累积概率,必须在 (0, 1) 内- Returns:
- the quantile x such that P(X ≤ x) = p / 使得 P(X ≤ x) = p 的分位数
- Throws:
MathException- if p is not in (0, 1)
-
toString
-