test_proportion
Run one-sample or group-wise proportion tests. Compares observed success proportions to a hypothesized value using normal approximation or exact binomial test, with optional continuity correction.
Instructions
Test proportions. One sample: a binary column (or raw successes/n) against a hypothesised proportion, with both the normal approximation and the exact binomial test. Two or more samples: pass group to compare the proportion across groups.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of trials, when not using a dataset. | |
| p | No | Hypothesised proportion for the one-sample test. | |
| x | No | Binary column whose second level counts as a success. | |
| data | No | Dataset name; omit when giving `successes` and `n` directly. | |
| group | No | Compare the proportion of `x` across the levels of this column. | |
| correct | No | Apply a continuity correction. | |
| successes | No | Number of successes, when not using a dataset. | |
| conf_level | No | Confidence level. |