Question: import math def cumulative_probability(x, mean, stddev): return 0.5 * (1 + math.erf((x - mean) / (stddev * math.sqrt(2)))) mean = 100 stddev = 15 IQ1
import math def cumulative_probability(x, mean, stddev): return 0.5 * (1 + math.erf((x - mean) / (stddev * math.sqrt(2)))) mean = 100 stddev = 15 IQ1 = float(input("Enter IQ1: ")) IQ2 = float(input("Enter IQ2: ")) prob_ge_IQ1 = 1 - cumulative_probability(IQ1, mean, stddev) prob_le_IQ1 = cumulative_probability(IQ1, mean, stddev) prob_between = cumulative_probability(IQ2, mean, stddev) - cumulative_probability(IQ1, mean, stddev) print("Probability of IQ >= IQ1: ", prob_ge_IQ1) print("Probability of IQ <= IQ1: ", prob_le_IQ1) print("Probability of IQ between IQ1 and IQ2: ", prob_between)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
