class
FisherSnedecor
extends
DistributionFisherSnedecor(df1: Tensor | float, df2: Tensor | float, validate_args: bool | None = None)Fisher-Snedecor F-distribution — ratio of two scaled Chi-squared variates.
FisherSnedecor(df1=d1, df2=d2) is the distribution of the statistic
where and are independent. The F-distribution is foundational in classical statistics: it arises in ANOVA F-tests and in the likelihood-ratio test for comparing nested linear models.
Parameters
Attributes
Notes
PDF:
Log-PDF (stable form using lgamma):
Moments (when defined):
- Mean ():
- Variance ():
Sampling draws one and one sample and forms the ratio. Both samples are drawn via the Gamma sampler.
Examples
>>> import lucid
>>> from lucid.distributions import FisherSnedecor
>>> dist = FisherSnedecor(df1=5.0, df2=10.0)
>>> samples = dist.sample((100,))
>>> dist.mean # d2/(d2-2) = 10/8 = 1.25Used by 1
Constructors
1dunder
__init__
→None__init__(df1: Tensor | float, df2: Tensor | float, validate_args: bool | None = None)Properties
2Instance methods
2Draw samples from the F-distribution.
Forms the ratio where and are independent samples drawn via the Gamma sampler.
Parameters
sample_shapetuple[int, ...]= ()Leading shape of the output sample batch.
Returns
TensorPositive samples of shape (*sample_shape, *batch_shape).