Then X symulates a random variable with what distribution? O Bernoulli of parameter p. Bernoulli of parameter 1-p. O Binomial of parameters p and n. O Binomial of parameters 1-p and n. O Geometric of parameter p. O None of the other answers are correct.

A First Course in Probability (10th Edition)
10th Edition
ISBN:9780134753119
Author:Sheldon Ross
Publisher:Sheldon Ross
Chapter1: Combinatorial Analysis
Section: Chapter Questions
Problem 1.1P: a. How many different 7-place license plates are possible if the first 2 places are for letters and...
icon
Related questions
Question
Consider the following algorithm that takes inputs a parameter 0<p<1 and a natural number n.
function integer X(p,n)
% define a function X = integer, depending on p and n
X:=0
for i=1 to n
{
if RND <= p then X := X+1
% increment X by 1; write X++ if you prefer
}
Then X symulates a random variable with what distribution?
Bernoulli of parameter p.
O Bernoulli of parameter 1-p.
O Binomial of parameters p and n.
O Binomial of parameters 1-p and n.
O Geometric of parameter p.
O None of the other answers are correct.
Transcribed Image Text:Consider the following algorithm that takes inputs a parameter 0<p<1 and a natural number n. function integer X(p,n) % define a function X = integer, depending on p and n X:=0 for i=1 to n { if RND <= p then X := X+1 % increment X by 1; write X++ if you prefer } Then X symulates a random variable with what distribution? Bernoulli of parameter p. O Bernoulli of parameter 1-p. O Binomial of parameters p and n. O Binomial of parameters 1-p and n. O Geometric of parameter p. O None of the other answers are correct.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
A First Course in Probability (10th Edition)
A First Course in Probability (10th Edition)
Probability
ISBN:
9780134753119
Author:
Sheldon Ross
Publisher:
PEARSON
A First Course in Probability
A First Course in Probability
Probability
ISBN:
9780321794772
Author:
Sheldon Ross
Publisher:
PEARSON