In: Statistics and Probability
Generate 1, 000 random 0/1 variables that model mutations occurring along a 1, 000 long gene sequence (use 1 to represent the mutation). Assume these mutations occur independently at a rate of 10^−4 each; that is, each variable is equal to 1 with probability 10^−4 .
We need to generate 1000 random 0/1 variables each with 1000 long gene sequence
So we need to take random sample from bernoulli distribution,
Here we assume that the mutations occur independently at a rate of 10^−4 each
Let X = 1 if the mutation is occur
Therefore p = P(X = 1 ) = 10^-4 = 0.0001
Let's do it in excel:
Click on Data >>>Data Analysis>>> Random number generation>>>OK
Put the required information, Look the following image for this
Then click on OK so we get the 1000 columns of 1000 0/1 values each.
Look the following output ( Not able to upload complete output)