Perform Probability Density Analysis on t-Distribution in R Programming – dt() Function
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() Functiondt(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 vectorx <- seq(1, 10, by = 1) # Calling dt() Functiony <- dt(x, 2) # Plotting probability distribution graphplot(x, y, type ="l") |
Output:


