Math Quiz: Math for - The random and time modules

  1. A lottery machine contains balls numbered from 1 to 50 inclusive. If one ball is drawn at random, what is the probability that the number on the ball is a multiple of 7?

  2. A process selects an integer uniformly at random from the set \(\{10, 11, 12, \dots, 25\}\). How many distinct integers can be selected?

  3. An experiment starts at 09:45:30 and ends at 10:02:15 on the same day. What is the total duration of the experiment in seconds?

  4. If a random integer \(N\) is generated such that \(5 \le N < 15\), what is the sum of the smallest and largest possible values of \(N\)?

  5. A sensor generates a data point every 0.5 seconds. The first data point is generated at time \(t=0\) seconds.

    1. If the sensor operates for exactly 60 seconds, how many data points are generated in total?

    2. What if the sensor's generation interval is changed to 0.2 seconds, still operating for 60 seconds, with the first point at \(t=0\)? How many data points would be generated then?