Pooled Standard Error for Two Groups
Northbank Learning runs small pilots. Two cohorts sit the same end-of-module exam after being taught from two different drafts of a course, and each cohort reports its size and the spread of its marks.
Before anyone starts arguing about the gap between the two averages, the course lead wants to know what a gap is even worth here - that is, how much the difference between two cohort averages moves around on its own when the two drafts are equally good. The cohorts are rarely the same size, and the pilots differ in how scattered their marks are.
Notice what is not supplied: the two averages. This number describes the noise in a difference rather than the difference itself, so the averages play no part in it at all.
Task: Print the standard error of the difference between the two cohort means, rounded to 2 decimals. The conventions: the cohorts are independent samples, not the same students measured twice, so this is not a paired setup; the two population variances are assumed equal, so it is the pooled, equal-variance standard error rather than Welch's; the reported spreads are sample standard deviations; and rounding happens once, on the final value.
Input
Four lines: the first cohort's size, the first cohort's sample standard deviation, then the same two figures for the second cohort. The sizes are whole numbers of at least 2; the spreads are positive decimals.
Output
One line holding the standard error, rounded to 2 decimals and printed the way Python prints a float - 2.47.
Example:
Input:
10
5
10
6
Output:
2.47
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in