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
Elements Of Modern Algebra
Elements Of Modern Algebra
Algebra
ISBN:
9781285463230
Author:
Gilbert, Linda, Jimmie
Publisher:
Cengage Learning,
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,