在 R 编程中计算几何分位数函数的值 – qgeom()函数
R语言中的qgeom()
函数用于绘制几何分布的分位数函数图。
Syntax: qgeom(x, prob)
Parameters:
x: x-values of qgeom() function
prob: prob of plot
示例 1:
# R program to illustrate
# qgeom() function in r
# Specify x-values for qgeom function
x_qgeom <- seq(0, 2, by = 0.1)
# Apply qgeom function
y_qgeom <- qgeom(x_qgeom, prob = 1)
# Plot qgeom values
plot(y_qgeom)
输出:
示例 2:
# R program to illustrate
# qgeom() function in r
# Specify x-values for qgeom function
x_qgeom <- seq(0, 2, by = 0.02)
# Apply qgeom function
y_qgeom <- qgeom(x_qgeom, prob = 0.5)
# Plot qgeom values
plot(y_qgeom)
输出: