5. Multinomial
Using the Chi-Square test we calculated the power of the hypothesis test or the sample size necessary to have a certain power for the proof.
Example 1:
A manufacturer guarantees that 90% of the parts it supplies to the production line of a given factory conforms to specifications requested. Analysis of a sample of 200 pieces revealed that 25 were defective. At the 5% level, calculate the power of the test to detect the difference between the null proportion of 0.9 and a possible true proportion of 0.8.
We will use the data from the following table.
| n | $\mathbf{p_0}$ | $\mathbf{p_1}$ | $\mathbf{\alpha}$ |
| 200 | (0.9;0,1) | (0.8;0.2) | 0.05 |
We will upload the data to the system.
| p0 | p1 |
|---|---|
| 0.9 | 0.8 |
| 0.1 | 0.2 |
To load the data, open Data upload, choose the Paste tab, paste the table above (with the column names), give the dataset a name (for example, Poder — teste multinomial), and click Load.

In the sidebar menu, open Sample Size › Multinomial and fill in the Settings panel:
- Check Power.
- In Sample Size, enter
200. - In p0 (null proportion), select
p0. - In p (actual proportion), select
p1. - In Significance level, enter
0.05. - Click Calculate.

In the Results panel, you can also download the analysis as Excel, Word, or PDF.
The results are:
Analysis result
| Warning | |
| Power | 0.9970571 |
| Sample size | 200 |
| p0 | 0.9 $\quad$ 0.1 |
| p | 0.8 $\quad$ 0.2 |
| Significance level | 0.05 |
With this, we conclude that the power of the test to detect the difference between the null ratio of 0.9 and a possible real ratio of 0.8 is approximately 99.71%.
Example 2:
At the 5% significance level, calculate the required sample size. for the hypothesis test to detect with a power of at least 0.9, a difference between the proportion of the null hypothesis $p_0$ = 0.9 and a possible real proportion p = 0.87.
We will use the data from the following table:
| $\mathbf{p_0}$ | $\mathbf{p_1}$ | $\mathbf{\alpha}$ | Poder |
| (0.9;0,1) | (0.87;0.13) | 0.05 | 0.9 |
We will upload the data to the system.
| p0 | p1 |
|---|---|
| 0.90 | 0.87 |
| 0.10 | 0.13 |
Use the same dataset as in the previous example.
In the sidebar menu, open Sample Size › Multinomial and fill in the Settings panel:
- Check Sample size.
- Uncheck Power.
- In Power, enter
0.9. - In p0 (null proportion), select
p0. - In p (actual proportion), select
p1. - In Significance level, enter
0.05. - Click Calculate.

In the Results panel, you can also download the analysis as Excel, Word, or PDF.
The results are:
Analysis result
| Warning | |
| Power | 0.9 |
| Sample size | 1051 |
| Proportion | 0.9 0.1 |
| Hypothetical proportion | 0.87 0.13 |
| Significance level | 0.05 |
We therefore conclude that in order for the test to detect this small difference with a power of at least 0.9, a sample size of at least 1051 is required.