Skip to content
DeepForgeby svx
All problems
EasyStatisticsst-369

F Statistic Ratio of Variances

Problem

The F statistic for comparing two variances is the larger sample variance divided by the smaller under the two-sided test convention used here: s1^2 / s2^2.

Given the two sample variances, return the ratio.

Hint

Variance ratios follow an F distribution under normality.

Test cases

case 1
in: [4,1]
expected: 4
case 2
in: [1,1]
expected: 1
case 3
in: [9,3]
expected: 3
Starter codePython
def f_statistic_ratio_of_variances(s1_sq, s2_sq):
    # Your code here
    pass

3 test cases · run your code against them in the editor