maths.free › Statistics & Probability › Continuous random variables
Continuous random variables
Density functions: probability is area, and the uniform and exponential distributions.
For a continuous variable the probability of any exact value is 0; probability lives in areas under the density curve. The uniform density on [0, 10] is a flat 1/10, so P(2 ≤ X ≤ 5) is the area 3/10. The exponential density e^{−x} models waiting times.
Continuous Probability Functions
We begin by defining a continuous probability density function. We use the function notation f(x). Intermediate algebra may have been your first formal introduction to functions. In the study of probability, the functions we study are special. We define the function f(x) so that the area between it and the x-axis is equal to a probability. Since the maximum probability is one, the maximum area is also one. For continuous probability distributions, PROBABILITY = AREA.
Example
Consider the function f(x) = \(\frac{1}{20}\) for 0 ≤ x ≤ 20. x = a real number. The graph of f(x) = \(\frac{1}{20}\) is a horizontal line. However, since 0 ≤ x ≤ 20, f(x) is restricted to the portion between x = 0 and x = 20, inclusive.
f(x) = \(\frac{1}{20}\) for 0 ≤ x ≤ 20.
The graph of f(x) = \(\frac{1}{20}\) is a horizontal line segment when 0 ≤ x ≤ 20.
The area between f(x) = \(\frac{1}{20}\) where 0 ≤ x ≤ 20 and the x-axis is the area of a rectangle with base = 20 and height = \(\frac{1}{20}\).
\[\text{AREA}=20(\frac{1}{20})=1\]Suppose we want to find the area between f(x) = \(\frac{1}{20}\) and the x-axis where 0 < x < 2.
\[\text{AREA }=\ (2\ -\ 0)(\frac{1}{20})\ =\ 0.1\]
\[(2\ -\ 0)\ =\ 2\ =\text{ base of a rectangle}\]
The area corresponds to a probability. The probability that x is between zero and two is 0.1, which can be written mathematically as P(0 < x < 2) = P(x < 2) = 0.1.
Suppose we want to find the area between f(x) = \(\frac{1}{20}\) and the x-axis where 4 < x < 15.
\(\text{AREA }=\ (15\ -\ 4)(\frac{1}{20})\ =\ 0.55\)
\((15\ -\ 4)\ =\ 11\ =\text{ the base of a rectangle}\)
The area corresponds to the probability P(4 < x < 15) = 0.55.
Suppose we want to find P(x = 15). On an x-y graph, x = 15 is a vertical line. A vertical line has no width (or zero width). Therefore, P(x = 15) = (base)(height) = (0)\((\frac{1}{20})\) = 0
P(X <= x), which can also be written as P(X < x) for continuous distributions, is called the cumulative distribution function or CDF. Notice the less than or equal to symbol. We can also use the CDF to calculate P(X > x). The CDF gives area to the left and P(X > x) gives area to the right. We calculate P(X > x) for continuous distributions as follows: P(X > x) = 1 – P (X < x).
Label the graph with f(x) and x. Scale the x and y axes with the maximum x and y values. f(x) = \(\frac{1}{20}\), 0 ≤ x ≤ 20.
To calculate the probability that x is between two values, look at the following graph. Shade the region between x = 2.3 and x = 12.7. Then calculate the shaded area of a rectangle.
\(P(2.3
Condensed — the full section is in OpenStax Statistics.
The Uniform Distribution
The uniform distribution is a continuous probability distribution and is concerned with events that are equally likely to occur. When working out problems that have a uniform distribution, be careful to note if the data are inclusive or exclusive of endpoints.
Example
The data in are 55 smiling times, in seconds, of an eight-week-old baby.
| 10.4 | 19.6 | 18.8 | 13.9 | 17.8 | 16.8 | 21.6 | 17.9 | 12.5 | 11.1 | 4.9 |
| 12.8 | 14.8 | 22.8 | 20.0 | 15.9 | 16.3 | 13.4 | 17.1 | 14.5 | 19.0 | 22.8 |
| 1.3 | 0.7 | 8.9 | 11.9 | 10.9 | 7.3 | 5.9 | 3.7 | 17.9 | 19.2 | 9.8 |
| 5.8 | 6.9 | 2.6 | 5.8 | 21.7 | 11.8 | 3.4 | 2.1 | 4.5 | 6.3 | 10.7 |
| 8.9 | 9.4 | 9.4 | 7.6 | 10.0 | 3.3 | 6.7 | 7.8 | 11.6 | 13.8 | 18.6 |
The sample mean = 11.49 and the sample standard deviation = 6.23.
We will assume that the smiling times, in seconds, follow a uniform distribution between zero and 23 seconds, inclusive. This means that any smiling time from zero to and including 23 seconds is equally likely. The histogram that could be constructed from the sample is an empirical distribution that closely matches the theoretical uniform distribution.
Let X = length, in seconds, of an eight-week-old baby's smile.
The notation for the uniform distribution is
X ~ U(a, b) where a = the lowest value of x and b = the highest value of x.
The probability density function is f(x) = \(\frac{1}{b-a}\) for a ≤ x ≤ b.
For this example, X ~ U(0, 23) and f(x) = \(\frac{1}{23-0}\) for 0 ≤ X ≤ 23.
Formulas for the theoretical mean and standard deviation are
\[\mu =\frac{a+b}{2}\text{ and }\sigma =\sqrt{\frac{{(b-a)}^{2}}{12}}\]For this problem, the theoretical mean and standard deviation are
\[\mu \text{ = }\frac{0+23}{2}\text{ = 11}\text{.50 seconds and }\sigma \text{ = }\sqrt{\frac{{(23-0)}^{2}}{12}}\text{ = 6}\text{.64 seconds}\text{.}\]Notice that the theoretical mean and standard deviation are close to the sample mean and standard deviation in this example.
Condensed — the full section is in OpenStax Statistics.
The Uniform Distribution
Use the following information to answer the next 10 questions. The data that follow are the square footage (in 1,000 feet squared) of 28 homes:
| 1.5 | 2.4 | 3.6 | 2.6 | 1.6 | 2.4 | 2.0 |
| 3.5 | 2.5 | 1.8 | 2.4 | 2.5 | 3.5 | 4.0 |
| 2.6 | 1.6 | 2.2 | 1.8 | 3.8 | 2.5 | 1.5 |
| 2.8 | 1.8 | 4.5 | 1.9 | 1.9 | 3.1 | 1.6 |
The sample mean = 2.50 and the sample standard deviation = 0.8302.
The distribution can be written as X ~ U(1.5, 4.5).
Use the following information to answer the next eight exercises. A distribution is given as X ~ U(0, 12).
Use the following information to answer the next 12 exercises. The age of cars in the staff parking lot of a suburban college is uniformly distributed from six months (0.5 years) to 9.5 years.
The Exponential Distribution (Optional)
The exponential distribution is often concerned with the amount of time until some specific event occurs. For example, the amount of time (beginning now) until an earthquake occurs has an exponential distribution. Other examples include the length, in minutes, of long-distance business telephone calls, and the amount of time, in months, a car battery lasts. It can be shown, too, that the value of the change that you have in your pocket or purse approximately follows an exponential distribution.
Values for an exponential random variable occur in the following way. There are fewer large values and more small values. For example, the amount of money customers spend in one trip to the supermarket follows an exponential distribution. There are more people who spend small amounts of money and fewer people who spend large amounts of money.
Exponential distributions are commonly used in calculations of product reliability, or the length of time a product lasts.
Example
Let X = amount of time (in minutes) a postal clerk spends with his or her customer. The time is known to have an exponential distribution with the average amount of time equal to four minutes.
X is a continuous random variable since time is measured. It is given that μ = 4 minutes. To do any calculations, you must know m, the decay parameter.
\(m=\frac{1}{\mu }\). Therefore, \(m=\frac{1}{4}=0.25.\)
The standard deviation, σ, is the same as the mean. μ = σ
The distribution notation is X ~ Exp(m). Therefore, X ~ Exp(0.25).
The probability density function is f(x) = me-mx. The number e = 2.71828182846... It is a number that is used often in mathematics. Scientific calculators have the key "ex." If you enter one for x, the calculator will display the value e.
The curve is
f(x) = 0.25e–0.25x where x is at least zero and m = 0.25.
For example, f(5) = 0.25e(−0.25)(5) = 0.072. The probability that the postal clerk spends five minutes with the customers is 0.072.
The graph is as follows:
Notice the graph is a declining curve. When x = 0,
f(x) = 0.25e(−0.25)(0) = (0.25)(1) = 0.25 = m. The maximum value on the y-axis is m.
Condensed — the full section is in OpenStax Statistics.
Memorylessness of the Exponential Distribution
In recall that the amount of time between customers is exponentially distributed with a mean of two minutes (X ~ Exp(0.5)). Suppose that five minutes have elapsed since the last customer arrived. Since an unusually long amount of time has now elapsed, it would seem to be more likely for a customer to arrive within the next minute. With the exponential distribution, this is not the case—the additional time spent waiting for the next customer does not depend on how much time has already elapsed since the last customer. This is referred to as the memoryless property. Specifically, the memoryless property says the following
\[P\text{ (}X\text{ > }r\text{ + }t\text{ | }X\text{ > }r\text{) = }P\text{ (}X\text{ > }t\text{) for all }r\ \ge \text{ 0 and }t\ \ge \text{ 0}\]For example, if five minutes have elapsed since the last customer arrived, then the probability that more than one minute will elapse before the next customer arrives is computed by using r = 5 and t = 1 in the foregoing equation.
\[P\text{ (}X\text{ > 5 + 1 | }X\text{ > 5) = }P\text{ (}X\text{ > 1) = }{e}^{(-0.5)(1)}\ \approx \text{ 0}\text{.6065}\text{.}\]This is the same probability as that of waiting more than one minute for a customer to arrive after the previous arrival.
The exponential distribution is often used to model the longevity of an electrical or a mechanical device. In , the lifetime of a certain computer part has the exponential distribution with a mean of ten years (X ~ Exp(0.1)). The memoryless property says that knowledge of what has occurred in the past has no effect on future probabilities. In this case it means that an old part is not any more likely to break down at any particular time than a brand new part. In other words, the part stays as good as new until it suddenly breaks. For example, if the part has already lasted ten years, then the probability that it lasts another seven years is P(X > 17|X > 10) = P(X > 7) = 0.4966.
Relationship Between the Poisson and the Exponential Distribution
There is an interesting relationship between the exponential distribution and the Poisson distribution. Suppose that the time that elapses between two successive events follows the exponential distribution with a mean of μ units of time. Also assume that these times are independent, meaning that the time between events is not affected by the times between previous events. If these assumptions hold, then the number of events per unit time follows a Poisson distribution with mean λ = 1/μ. Recall from the chapter on Discrete Random Variables that if X has the Poisson distribution with mean λ, then \(P(X=k)=\frac{{\lambda }^{k}{e}^{-\lambda }}{k!}\). Conversely, if the number of events per unit time follows a Poisson distribution, then the amount of time between events follows the exponential distribution. (k! = k*(k–1*)(k–2)*(k–3)…3*2*1)
The Exponential Distribution (Optional)
Use the following information to answer the next 10 exercises. A customer service representative must spend different amounts of time with each customer to resolve various concerns. The amount of time spent with each customer can be modeled by the following distribution: X ~ Exp(0.2)
Use the following information to answer the next eight exercises. A distribution is given as X ~ Exp(0.75).
Use the following information to answer the next eight exercises. Carbon-14 is a radioactive element with a half-life of about 5,730 years. Carbon-14 is said to decay exponentially. The decay rate is 0.000121. We start with one gram of carbon-14. We are interested in the time (years) it takes to decay carbon-14.
ឧទាហរណ៍ដែលបានធ្វើ: integrate 1/10 dx from 2 to 5
ជំហានដោយជំហាន
- \int_{2}^{5} \frac{1}{10}\, dx
First find an antiderivative F, then evaluate F(b) − F(a).
- \int \frac{1}{10}\, dx = \frac{x}{10}
The integral of a constant c is c·x.
- F(5) - F(2) = \left(\frac{1}{2}\right) - \left(\frac{1}{5}\right)
Fundamental theorem of calculus: plug in the limits.
- = \frac{3}{10}
Simplify.
បង្ហាញចម្លើយ
Practice (40)
Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.
-
Consider the function f(x) = \(\frac{\text{1}}{8}\) for 0 ≤ x ≤ 8. Draw the graph of f(x) and find P(2.5 < x < 7.5).
បង្ហាញចម្លើយ
P (2.5 < x < 7.5) = 0.625
-
Which type of distribution does the graph illustrate?
បង្ហាញចម្លើយ
Uniform distribution
-
Which type of distribution does the graph illustrate?
-
Which type of distribution does the graph illustrate?
បង្ហាញចម្លើយ
Normal distribution
-
What does the shaded area represent? P(___< x < ___)
-
What does the shaded area represent? P(___< x < ___)
បង្ហាញចម្លើយ
P(6 < x < 7)
-
For a continuous probablity distribution, 0 ≤ x ≤ 15. What is P(x > 15)?
-
What is the area under f(x) if the function is a continuous probability density function?
បង្ហាញចម្លើយ
one
-
For a continuous probability distribution, 0 ≤ x ≤ 10. What is P(x = 7)?
-
A continuous probability function is restricted to the portion between x = 0 and 7. What is P(x = 10)?
បង្ហាញចម្លើយ
zero
-
f(x) for a continuous probability function is \(\frac{1}{5}\), and the function is restricted to 0 ≤ x ≤ 5. What is P(x < 0)?
-
f(x), a continuous probability function, is equal to \(\frac{1}{12}\), and the function is restricted to 0 ≤ x ≤ 12. What is P (0 < x < 12)?
បង្ហាញចម្លើយ
one
-
Find the probability that x falls in the shaded area.
-
Find the probability that x falls in the shaded area.
បង្ហាញចម្លើយ
0.625
-
Find the probability that x falls in the shaded area.
-
f(x), a continuous probability function, is equal to \(\frac{1}{3}\) and the function is restricted to 1 ≤ x ≤ 4. Describe \(P(x>\frac{3}{2}).\)
បង្ហាញចម្លើយ
The probability is equal to the area from x = \(\frac{3}{2}\) to x = 4 above the x-axis and up to f(x) = \(\frac{1}{3}\).
-
Consider the following experiment. You are one of 100 people enlisted to take part in a study to determine percentage of nurses in America with an R.N. (registered nurse) degree. You ask nurses if they have an R.N. degree. The nurses answer yes or no. You then calculate the percentage of nurses with an R.N. degree. You give that percentage to your supervisor.
- What part of the experiment will yield discrete data?
- What part of the experiment will yield continuous data?
-
When age is rounded to the nearest year, do the data stay continuous, or do they become discrete? Why?
បង្ហាញចម្លើយ
Age is a measurement, regardless of the accuracy used.
-
The data that follow are the number of passengers on 35 different charter fishing boats. The sample mean = 7.9 and the sample standard deviation = 4.33. The data follow a uniform distribution where all values between and including zero and 14 are equally likely. State the values of a and b. Write the distribution in proper notation, and calculate the theoretical mean and standard deviation.
1 12 4 10 4 14 11 7 11 4 13 2 4 6 3 10 0 12 6 9 10 5 13 4 10 14 12 11 6 10 11 0 11 13 2 បង្ហាញចម្លើយ
a is zero, b is 14, X ~ U (0, 14), μ = 7 passengers, σ = 4.04 passengers
-
a. Refer to . What is the probability that a randomly chosen eight-week-old baby smiles between two and 18 seconds?
បង្ហាញចម្លើយ
P(2 < x < 18) = (base)(height) = (18 – 2)\((\frac{1}{23})\) = \(\frac{16}{23}\)
-
b. Find the 90th percentile for an eight-week-old baby's smiling time.
បង្ហាញចម្លើយ
b. Ninety percent of the smiling times fall below the 90th percentile, k, so P(x < k) = 0.90.
\[P(x -
c. Find the probability that a random eight-week-old baby smiles more than 12 seconds knowing that the baby smiles more than eight seconds.
បង្ហាញចម្លើយ
c. This probability question is a conditional. You are asked to find the probability that an eight-week-old baby smiles more than 12 seconds when you already know the baby has smiled for more than eight seconds.
Find P(x > 12|x > 8) There are two ways to do the problem. For the first way, use the fact that this is a conditional and changes the sample space. The graph illustrates the new sample space. You already know the baby smiled more than eight seconds.
for 8 < x < 23
Write a new f(x): f(x) = \(\frac{1}{23\ -\text{ 8}}\) = \(\frac{1}{15}\) for 8 < x < 23.
P(x > 12|x > 8) = (23 − 12)\((\frac{1}{15})\) = \(\frac{11}{15}\)
For the second way, use the conditional formula from Probability Topics with the original distribution.
P(A|B) = \(\frac{P(A\text{ AND }B)}{P(B)}\)
For this problem, A is (x > 12) and B is (x > 8).
So, P(x > 12|x > 8) = \(\frac{(x>12\text{ AND }x>8)}{P(x>8)}=\frac{P(x>12)}{P(x>8)}=\frac{\frac{11}{23}}{\frac{15}{23}}=\frac{11}{15}\)
-
A distribution is given as X ~ U(0, 20). What is P(2 < x < 18)? Find the 90th percentile.
បង្ហាញចម្លើយ
P(2 < x < 18) = 0.8, 90th percentile = 18
-
a. What is the probability that a person waits fewer than 12.5 minutes?
បង្ហាញចម្លើយ
a. Let X = the number of minutes a person must wait for a bus. a = 0 and b = 15. X ~ U(0, 15). Write the probability density function. f (x) = \(\frac{1}{15\ -\ 0}\) = \(\frac{1}{15}\) for 0 ≤ x ≤ 15.
Find P (x < 12.5). Draw a graph.
\[P(xThe probability a person waits fewer than 12.5 minutes is 0.8333. -
b. On the average, how long must a person wait? Find the mean, μ, and the standard deviation, σ.
បង្ហាញចម្លើយ
b. μ = \(\frac{a\ +\ b}{2}\) = \(\frac{15\ +\ 0}{2}\) = 7.5. On the average, a person must wait 7.5 minutes.
σ = \(\sqrt{\frac{(b-a{)}^{2}}{12}}=\sqrt{\frac{(15-0{)}^{2}}{12}}\) = 4.3. The standard deviation is 4.3 minutes. -
c. Ninety percent of the time, the minutes a person must wait falls below what value?
បង្ហាញចម្លើយ
c. Find the 90th percentile. Draw a graph. Let k = the 90th percentile.
\(P(x
\(0.90=(k)(\frac{1}{15})\)
\(k=(0.90)(15)=13.5\)
k is sometimes called a critical value.
The 90th percentile is 13.5 minutes. Ninety percent of the time, a person must wait at most 13.5 minutes. -
The total duration of baseball games in the major league in the 2011 season is uniformly distributed between 447 hours and 521 hours inclusive.
- Find a and b and describe what they represent.
- Write the distribution.
- Find the mean and the standard deviation.
- What is the probability that the duration of games for a team for the 2011 season is between 480 and 500 hours?
- What is the 65th percentile for the duration of games for a team for the 2011 season?
បង្ហាញចម្លើយ
- a is 447, and b is 521. a is the minimum duration of games for a team for the 2011 season, and b is the maximum duration of games for a team for the 2011 season.
- X ~ U (447, 521).
- μ = 484, and σ = 21.36
- P(480 < x < 500) = 0.2703
- 65th percentile is 495.1 hours.
-
a. The probability that a randomly selected nine-year-old child eats a doughnut in at least two minutes is _______.
បង្ហាញចម្លើយ
a. 0.5714
-
b. Find the probability that a different nine-year-old child eats a doughnut in more than two minutes given that the child has already been eating the doughnut for more than 1.5 minutes.
The second question has a conditional probability. You are asked to find the probability that a nine-year-old child eats a doughnut in more than two minutes given that the child has already been eating the donut for more than 1.5 minutes. Solve the problem two different ways (see ). You must reduce the sample space. First way: Since you know the child has already been eating the doughnut for more than 1.5 minutes, you are no longer starting at a = 0.5 minutes. Your starting point is 1.5 minutes.
Write a new f(x):
\[f(x)\text{ = }\frac{1}{4-1.5}\ =\ \frac{2}{5}\text{ for 1}\text{.5 }\le \ x\le 4.\]Find P(x > 2|x > 1.5). Draw a graph.
\[P(x>2|x>1.5)\text{ = (base)(new height) = (4 - 2)}(\frac{2}{5})=\frac{4}{5}\]បង្ហាញចម្លើយ
b. \(\frac{4}{5}\)
-
Suppose the time it takes a student to finish a quiz is uniformly distributed between six and 15 minutes, inclusive. Let X = the time, in minutes, it takes a student to finish a quiz. Then X ~ U(6, 15).
Find the probability that a randomly selected student needs at least eight minutes to complete the quiz. Then find the probability that a different student needs at least eight minutes to finish the quiz given that she has already taken more than seven minutes.
បង្ហាញចម្លើយ
P (x > 8) = 0.7778
P (x > 8 | x > 7) = 0.875
-
- Find the probability that a randomly selected furnace repair requires more than two hours.
- Find the probability that a randomly selected furnace repair requires less than three hours.
- Find the 30th percentile of furnace repair times.
- The longest 25 percent of furnace repair times take at least how long? (In other words: find the minimum time for the longest 25 percent of repair times.) What percentile does this represent?
- Find the mean and standard deviation
បង្ហាញចម្លើយ
a. To find f(x): f (x) = \(\frac{1}{4\ -\ 1.5}\) = \(\frac{1}{2.5}\) so f(x) = 0.4
P(x > 2) = (base)(height) = (4 – 2)(0.4) = 0.8
-
The amount of time a service technician needs to change the oil in a car is uniformly distributed between 11 and 21 minutes. Let X = the time needed to change the oil on a car.
- Write the random variable X in words. X = __________________.
- Write the distribution.
- Graph the distribution.
- Find P (x > 19).
- Find the 50th percentile.
បង្ហាញចម្លើយ
- Let X = the time needed to change the oil in a car.
- X ~ U (11, 21).
- P (x > 19) = 0.2
- the 50th percentile is 16 minutes.
-
What type of distribution is this?
-
In this distribution, outcomes are equally likely. What does this mean?
បង្ហាញចម្លើយ
It means that the value of x is just as likely to be any number between 1.5 and 4.5.
-
What is the height of f(x) for the continuous probability distribution?
-
What are the constraints for the values of x?
បង្ហាញចម្លើយ
1.5 ≤ x ≤ 4.5
-
Graph P(2 < x < 3).
-
What is P(2 < x < 3)?
បង្ហាញចម្លើយ
0.3333
-
What is P(x < 3.5| x < 4)?
-
What is P(x = 1.5)?
បង្ហាញចម្លើយ
zero
ព្យាយាមរបស់អ្នកផ្ទាល់
Parts of this page are adapted from OpenStax Statistics (CC BY 4.0). Condensed and re-explained here; errors are ours.
បន្ថែមទៀតក្នុង Statistics & Probability
Sampling and dataDescribing data with graphsMean, median and modeProbabilityCounting: permutations and combinationsDiscrete random variablesThe normal distributionThe central limit theoremConfidence intervalsHypothesis testingComparing two samplesChi-square testsLinear regression and correlationANOVA and the F distribution