What are the possible values of z after running the following code? x = Math.random(); if (x<0.25) z = 0; else if (x>
Posted: Wed Mar 30, 2022 9:17 am
What are the possible values of z after running the following
code?
x = Math.random();
if (x<0.25)
z = 0;
else if (x>=0.75)
z = 1;
else
z = 2;
Group of answer choices
z is an integer such that zϵ{0, 1, 2} with equal probabilities
of occurrence
z is an integer such that zϵ{0, 1, 2} with probabilities of
occurrence 0.5, 0.25, 0.25 respectively
z is an integer such that zϵ{0, 1, 2} with probabilities of
occurrence 0.25, 0.5, 0.75 respectively
z is an integer such that zϵ{0, 1, 2} with probabilities of
occurrence 0.25, 0.25, 0.5 respectively
code?
x = Math.random();
if (x<0.25)
z = 0;
else if (x>=0.75)
z = 1;
else
z = 2;
Group of answer choices
z is an integer such that zϵ{0, 1, 2} with equal probabilities
of occurrence
z is an integer such that zϵ{0, 1, 2} with probabilities of
occurrence 0.5, 0.25, 0.25 respectively
z is an integer such that zϵ{0, 1, 2} with probabilities of
occurrence 0.25, 0.5, 0.75 respectively
z is an integer such that zϵ{0, 1, 2} with probabilities of
occurrence 0.25, 0.25, 0.5 respectively