@hanno (not a statistician) for large N (N > 30), you can approximate the Hamming weight as a normal distribution with mean = n/2 and stddev = sqrt(n)/2 (see https://en.wikipedia.org/wiki/Binomial_distribution)
From that, you can get the probability that the weight sits between 0.4n and 0.6n by calculating the integral between these two points (erf function).
A good rule of thumb is knowing that there's a 68-95-99.7 probability that the actual value is 1-2-3 stddevs from the mean.
I don't know what to do for small N.
In reply to
bkim
@bkim@mastodon.social
Nerd em geral, eng de dados em particular Hobby: criar linguagens de programação Eu prefiro seguir alguém assim que eu vejo um post legal. Não dá pra confiar que os boosts vão continuar trazendo as pessoas pro feed, então eu prefiro ele cheio!
mastodon.social
@bkim@mastodon.social
·
Apr 06, 2026
1
0
0
Loading comments...