Plotting Exponential Distribuions


Here, we will plot an exponential distribution with average rate 1.5 from 0 to 5. To define our range of rates, we'll use the sequence command to create a range of points from 0 to 5 incremented by 0.5.

Sage Cell


x <- seq(from=0, to=5, by=0.5)
plot(x=x, y=dexp(x, rate=1.5))


Plotting an Exponential Distribution Curve

We can plot an exponential curve by adding "l" to the plot command. To increase accuracy, we will generate the plot using 200 points. This is accomplished by setting length.out in seq to 200.


x <- seq(from=0, to=5, length.out=200)
plot(x=x, y=dexp(x, rate=1.5), "l")


Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.




Date: 24 Apr 2019 21:14

Submitted by: Zane Corbiere

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License