pystatpower.misc.observe_at_least_one_event
¶
| FUNCTION | DESCRIPTION |
|---|---|
solve_power |
Calculate the detection power. |
solve_size |
Estimate the required sample size. |
solve_proportion |
Estimate the required event proportion. |
solve_power
¶
Calculate the detection power.
| PARAMETER | DESCRIPTION |
|---|---|
proportion
|
Event proportion.
TYPE:
|
size
|
Sample size.
TYPE:
|
dist
|
The distribution of the number of events that occurred.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
The power to observe at least one event. |
solve_size
¶
solve_size(*, proportion: float, power: float = 0.95, dist: Literal['bin', 'poisson'] = 'bin') -> int
Estimate the required sample size.
| PARAMETER | DESCRIPTION |
|---|---|
proportion
|
Event proportion.
TYPE:
|
power
|
The detection power. 0.95 is a commonly used value for the detection power.
TYPE:
|
dist
|
The distribution of the number of events that occurred.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
int
|
The required sample size. |
solve_proportion
¶
solve_proportion(*, size: int, power: float = 0.95, dist: Literal['bin', 'poisson'] = 'bin') -> float
Estimate the required event proportion.
| PARAMETER | DESCRIPTION |
|---|---|
size
|
Sample size.
TYPE:
|
power
|
The detection power. 0.95 is a commonly used value for the detection power.
TYPE:
|
dist
|
The distribution of the number of events that occurred.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
The required event proportion. |