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.

Linear Algebra: A Modern Introduction
4th Edition
ISBN:9781285463247
Author:David Poole
Publisher:David Poole
Chapter5: Orthogonality
Section5.3: The Gram-schmidt Process And The Qr Factorization
Problem 7BEXP
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
Recommended textbooks for you
Linear Algebra: A Modern Introduction
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning