What is the probability for z to be equal to 3 after running the
following code?
x = Math.random();
if (x<0.2)
z = 0;
else if (x>=0.4 && x<0.6)
z = 1;
else if (x>=0.8)
z = 2;
else
z = 3;
What is the probability for z to be equal to 3 after running the following code? x = Math.random(); if (x<0.2) z = 0;
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am