Here is the design of a clinical trial:

Official Title: Low Dose Trimethoprim-Sulfamethoxazole for the Treatment of Pneumocystis Jirovecii Pneumonia

Included conditions:
- Pneumocystis
- Pneumocystis Pneumonia
- Pneumocystis Jirovecii Infection
- Pneumocystis Infections
- Pneumocystis Carinii Infection
- Pneumocystosis; Pneumonia (Etiology)
- Pneumocystis Carinii; Infection, Resulting From HIV Disease
- Pneumocystosis Associated With AIDS

Study Armgroups:
- {'label': 'Reduced dose TMP-SMX', 'type': 'EXPERIMENTAL', 'description': 'Trimethoprim-Sulfamethoxazole at a total dose of 10mg/kg/day. Oral or intravenous drug will be administered at discretion of treating team. This will be given as a dose of 10mg/kg/day open label with additional placebo tablets or intravenous placebo solution given to simulate 15mg/kg/day. All doses will be adjusted for obesity and renal function.', 'interventionNames': ['Drug: trimethoprim-sulfamethoxazole']}
- {'label': 'Standard dose TMP-SMX', 'type': 'ACTIVE_COMPARATOR', 'description': 'Trimethoprim-Sulfamethoxazole at a total dose of 15mg/kg/day. Oral or intravenous drug will be administered at discretion of treating team. This will be given as 10mg/kg/day open label plus an extra masked 5mg/kg/day of tablets or intravenous solution. All doses will be adjusted for obesity and renal function.', 'interventionNames': ['Drug: trimethoprim-sulfamethoxazole']}

Interventions:
- {'type': 'DRUG', 'name': 'trimethoprim-sulfamethoxazole', 'description': '10mg/kg/day of TMP component', 'armGroupLabels': ['Reduced dose TMP-SMX'], 'otherNames': ['Reduced dose']}
- {'type': 'DRUG', 'name': 'trimethoprim-sulfamethoxazole', 'description': '15mg/kg/day of TMP component', 'armGroupLabels': ['Standard dose TMP-SMX'], 'otherNames': ['Standard dose']}

Primary Outcomes:
- {'measure': 'Proportion with Treatment failure', 'description': 'Composite of death, new mechanical ventilation or treatment change for presumed inefficacy or severe adverse events', 'timeFrame': '21 days'}

Please estimate the sample size based on the assumption: 
The study assumes 80% power and a two-tailed alpha error probability of 0.05 for superiority. For non-inferiority, a one-sided 95% CI with an upper limit excluding a difference in favor of the high dose group of more than 5% is assumed.
Sample size
          The primary effectiveness endpoint for this study is a composite of death, new mechanical ventilation or change in treatment by day 21. In accordance with our meta-analysis, 20% of patients on conventional dose of TMP-SMX experienced death.49 Various published studies have shown estimates varying from 14%58 to 30%59 on this dose requiring mechanical ventilation. Conversely, a meta-analysis showed mortality of 9% among the low-dose treatment group.49 Estimates of mechanical ventilation are sparse in the low-dose group; between 0%58 and 34%.60 An observational study of 104 patients reported an Intensive Care Unit admission rate (with and without mechanical ventilation) of 17% in a low-dose group.32 Therefore, based on unpublished data collected at the MUHC, our meta-analysis, and previously published observational studies and RCTs, we estimate that the composite endpoint will occur in approximately 40% of patients administered the standard dose and 20%â25% of those taking reduced dose. To detect an absolute difference of 15% in event rate (40% in the standard dose group vs 25% in the reduced dose group) with 80% power and a two-tailed alpha error probability of 0.05, we will require a total sample size of 300 participants (n=150 per arm) to obtain an objective of superiority. We have an interest in establishing non-inferiority should a superiority trial fail to detect a significant difference between dosage groups.61 We will prespecify a prospectively defined margin of 5% for non-inferiority. Assuming there is a true difference in favour of the reduced dose treatment of 9% (eg, 40% vs 31%), a total of 288 (n=144 per arm) patients will be required for 80% power to ensure that the upper limit of a one-sided 95% CI will exclude a difference in favour of the high dose group of more than 5%.