# R Program to perform# Probability Density Analysis# Calling dt() Function
dt(0,10)
dt(1,15)
dt(3,40)
R
输出
[1]0.3891084[1]0.2341248[1]0.006185947
R
例2 :
# R Program to perform# Probability Density Analysis# Creating a vector
x <- seq(1,10, by =1)# Calling dt() Function
y <- dt(x,2)# Plotting probability distribution graph
plot(x, y, type ="l")