MedCalc # Sample size calculation: comparison of two proportions

 Command: Sample size Comparison of two proportions

## Description

Calculates the required sample size for the comparison of two proportions. The sample size takes into account the required significance level and power of the test (see Sample size calculation: Introduction).

## Required input

• Type I error - alpha: the probability of making a Type I error (α-level, two-sided), i.e. the probability of rejecting the null hypothesis when in fact it is true.
• Type II error - beta: the probability of making a Type II error (β-level), i.e. the probability of accepting the null hypothesis when in fact it is false.
• Proportion in group 1 (%): hypothesized proportion in the first sample.
• Proportion in group 2 (%): hypothesized proportion in the second sample (the hypothesized difference with the first proportion is considered to be biologically significant).
• Ratio of sample sizes in Group 1 / Group 2: the ratio of the sample sizes in group 1 and 2. Enter 1 for equal sample sizes in both groups. Enter 2 if the number of cases in group 1 must be double of the number of cases in group 2.
• Statistical analysis: select the statistical test that will be used to analyse the study data: Chi-squared test or Fisher's exact test.

## Example

In the example you are interested in detecting a difference between two proportions of a least 15. You expect the two proportions to be equal to 75 and 60 in group 1 and 2 respectively. You will include twice as many cases in group 1 as in group 2. You plan to analyse the results of your study using a Chi-squared test.

For α-level you select 0.05 and for β-level you select 0.20 (power is 80%). After you click Calculate the program displays the required sample size, which is 224 in the first group and 112 in the second group, i.e. 336 cases in total.

A table shows the required sample size for different Type I and Type II Error levels.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8709347,"math_prob":0.83629847,"size":3090,"snap":"2021-31-2021-39","text_gpt3_token_len":673,"char_repetition_ratio":0.14063513,"word_repetition_ratio":0.03846154,"special_character_ratio":0.2184466,"punctuation_ratio":0.10344828,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99867177,"pos_list":[0,1,2,3,4,5,6,7,8],"im_url_duplicate_count":[null,null,null,null,null,null,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-20T09:08:18Z\",\"WARC-Record-ID\":\"<urn:uuid:e7533938-f8c0-4e1d-b55c-e5ef482a6651>\",\"Content-Length\":\"31116\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:36c29893-b75b-45f6-80ed-3f795c385e36>\",\"WARC-Concurrent-To\":\"<urn:uuid:9f905ab6-1ab2-4d4e-966b-38da2fc0d490>\",\"WARC-IP-Address\":\"104.26.2.186\",\"WARC-Target-URI\":\"https://medcalc.org/manual/sample-size-comparison-of-proportions.php\",\"WARC-Payload-Digest\":\"sha1:A5R733MAJOBQPG4I3AZQS2QUN5AWY2VQ\",\"WARC-Block-Digest\":\"sha1:ZNSF5BWLZBV5NL3FTHX5RQOUEW7NCOXH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057033.33_warc_CC-MAIN-20210920070754-20210920100754-00503.warc.gz\"}"}