Lab 07 ContinuosDistribution
Lab 07 ContinuosDistribution
Lab 07 ContinuosDistribution
Let X be a continuous random variable in [4, 6]. Create an array of 100 continuous real numbers
in [4, 6] and save to variable X.
1 Uniform distribution
The random variable X that has a constant even distribution will receive values on [a, b]. The
probability that X receives any value of the range (a, b) is equal to . The notation X is evenly
distributed on (a, b) is X ∼ U (a, b).
Using the above pmf_uniform_cont function to graph the relationship between the random
variable X and the corresponding probability. The horizontal axis represents the value of the
random variable X, the vertical axis represents the corresponding probability p (x).
The probability density function of the normal distribution is determined by the formula:
The cumulative distribution function of the normal distribution is determined by the formula:
Write the probability density function and the cumulative distribution function of the normal
distribution:
Use the pmf_normal above function to plot a graph representing the relationship between
random variable X (following the normal distribution with two parameters µ and σ) and the
corresponding probability.
The horizontal axis represents the value of the random variable X, the vertical axis represents the
corresponding probability p (x).
Reference answers:
2. The time to produce a product of workshop A is a random variable that follows the normal
distribution with parameters µ = 10 and σ = 1 (minute units). Use the functions in the exercise to
calculate the probability that the product will be generated in the period from 9 minutes to 12
minutes. (Answer: 0.8185)