PascalVKooten
PascalVKooten

Reputation: 21453

Frequencies for a normal distribution

How to get frequencies that reflect a normal distribution for each integer 1...400.

Values 1 and 400 would have the minimum frequency of 1, what would the frequencies be for the other values?

Also, what if we would want the frequencies be in the case of the integers 1...300. Is there a general expression to get frequencies for normality?

EDIT:

Here's a start of what I am looking for:

probability_weights <- choose(400, 0:400)

sample(1:400, 400, replace=T, prob=probability_weights)

The issue is that this will get a sample, whereas I'd like to get definite population frequencies (so basically just scaled down the huge triangle probabilities).

Upvotes: 0

Views: 213

Answers (1)

Roland
Roland

Reputation: 132706

It seems like you want the binomial distribution:

binom <- function(k,p,n) choose(n,k)*p^k*(1-p)^(n-k)

p <- binom(0:399,0.5,399)

plot(p/min(p))

binomial distribution

p[1]/min(p)
#[1] 1
p[400]/min(p)
#[1] 1

Upvotes: 2

Related Questions