approximate non central chi squared
construct_inverse_non_central_chi_squared_interpolated_polynomial_approximation(degrees_of_freedom, polynomial_order=1, n_intervals=16, n_interpolating_functions=16)
Computes a polynomial approximation to the inverse cumulative distribution function for the non-central \( \chi^2 \) distribution for a fixed number of degrees of freedom \( \nu \). The approximation is parametrised by a non-centrality parameter \( \lambda \).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
degrees_of_freedom
|
float
|
The degrees of freedom \( \nu \). |
required |
polynomial_order
|
int
|
The polynomial order. |
1
|
n_intervals
|
int
|
The number of intervals. |
16
|
n_interpolating_functions
|
int
|
The number of interpolating functions for interpolating the non-centrality parameter \( \lambda \). |
16
|
Returns:
Type | Description |
---|---|
Callable
|
The approximation. |
Source code in src/pyarv/non_central_chi_squared/_approximate_non_central_chi_squared.py
dyadic_function_approximation_constructor(f, n_intervals, polynomial_order)
Constructs a piecewise polynomial approximation to a function \( f \) which is piecewise \( L^2 \) optimal on dyadic intervals on each of \( [0, \tfrac{1}{2} ) \) and \( [\tfrac{1}{2}, 1] \).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
f
|
Callable
|
\( f \). |
required |
n_intervals
|
int
|
The number of intervals. |
required |
polynomial_order
|
int
|
The polynomial order. |
required |
Returns:
Type | Description |
---|---|
Callable
|
The approximations. |