pystatpower.mean.independent.ci
¶
| FUNCTION | DESCRIPTION |
|---|---|
solve_precision |
Calculate the distance from the mean difference to the confidence limit. |
solve_size |
Estimate the required sample size. |
solve_precision
¶
solve_precision(
*,
treatment_std: float,
reference_std: float,
treatment_size: int,
reference_size: int,
conf_level: float = 0.95,
interval_type: Literal["two-sided", "lower", "upper"] = "two-sided",
equal_var: bool = False,
) -> float
Calculate the distance from the mean difference to the confidence limit.
| PARAMETER | DESCRIPTION |
|---|---|
treatment_std
|
Standard deviation in the treatment group.
TYPE:
|
reference_std
|
Standard deviation in the reference group.
TYPE:
|
treatment_size
|
Sample size in the treatment group.
TYPE:
|
reference_size
|
Sample size in the reference group.
TYPE:
|
conf_level
|
Confidence level.
TYPE:
|
interval_type
|
The type of confidence interval.
TYPE:
|
equal_var
|
Specify whether the variances are assumed to be equal.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
The distance from the mean difference to the confidence limit. |
solve_size
¶
solve_size(
*,
treatment_std: float,
reference_std: float,
precision: float,
ratio: float = 1,
conf_level: float = 0.95,
interval_type: Literal["two-sided", "lower", "upper"] = "two-sided",
equal_var: bool = False,
) -> tuple[int, int]
Estimate the required sample size.
| PARAMETER | DESCRIPTION |
|---|---|
treatment_std
|
Standard deviation in the treatment group.
TYPE:
|
reference_std
|
Standard deviation in the reference group.
TYPE:
|
precision
|
The distance from the mean difference to the confidence limit.
TYPE:
|
ratio
|
The ratio of the sample size in the treatment group to the sample size in the reference group.
TYPE:
|
conf_level
|
Confidence level.
TYPE:
|
interval_type
|
The type of confidence interval.
TYPE:
|
equal_var
|
Specify whether the variances are assumed to be equal.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple[int, int]
|
The required sample sizes in the treatment and reference groups, respectively. |