Open In App
Related Articles

Perform Probability Density Analysis on t-Distribution in R Programming – dt() Function

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
dt() function in R Language is used to return the probability density analysis on the Student t-distribution with random variable x and degree of freedom df.
Syntax: dt(x, df) Parameters: x: Random Variable df: Degree of Freedom
Example 1:
# R Program to perform
# Probability Density Analysis
  
# Calling dt() Function
dt(0, 10)
dt(1, 15)
dt(3, 40)

                    
Output:
[1] 0.3891084
[1] 0.2341248
[1] 0.006185947
Example 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")

                    
Output: PDA-graph

Last Updated : 19 Jun, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads