📜  在 R 编程中计算对数正态概率密度 – dlnorm()函数

📅  最后修改于: 2022-05-13 01:54:57.919000             🧑  作者: Mango

在 R 编程中计算对数正态概率密度 – dlnorm()函数

R语言中的dlnorm()函数用于计算概率密度函数的对数正态值。它还创建了对数正态密度图。

示例 1:

# R program to compute
# log normal probability density
  
# Creating x-values for density
x <- seq(1, 10, by = 1)
  
# Calling dlnorm() function
y <- dlnorm(x)
y

输出:

[1] 0.398942280 0.156874019 0.072728256 0.038153457 0.021850715 0.013354538
 [7] 0.008581626 0.005739296 0.003965747 0.002815902

示例 2:

# R program to compute
# log normal probability density
  
# Creating x-values for density
x <- seq(1, 10, by = 0.1)
  
# Calling dlnorm() function
y <- dlnorm(x)
  
# Plot a graph
plot(y)

输出: