1 hour ago · Tech · 0 comments

The previous post looked at the expected IQ range in a jury of 12. This post will look more generally at computing the expected range of n samples from a N(0, 1) random variable. This will give the expected range in units of σ, i.e. multiply the results by σ if your σ isn’t 1. As mentioned in the previous post, the expected range is given by where φ and Φ are the PDF and CDF of a standard normal. The integral can be calculated in closed form for n ≤ 5, but in general it requires numerical integration [1]. The following Python code can compute dn. from scipy.stats import norm from scipy.integrate import quad import numpy as np def d(n): integrand = lambda x: x*norm.pdf(x)*norm.cdf(x)**(n-1) res, info = quad(integrand, -np.inf, np.inf) return 2*n*res For large n we have the asymptotic approximation which we could implement in Python by def approx(n): return 2*norm.ppf((n - 0.375)/(n + 0.25)) For very large n the asymptotic expression may be more accurate than the integral due to…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.