R语言 计算负二项式量化函数的值 – qnbinom()函数

R语言 计算负二项式量化函数的值 – qnbinom()函数

R语言中的 qnbinom() 函数用于计算负二项式量化函数的值。它还可以创建一个负二项式量化函数的密度图。

语法: qnbinom(vec, size, prob)

参数:

vec: 二项式密度的X值

size: 试验的数量

prob:概率

例1 :

# R program to compute value of
# Negative Binomial Quantile Function
  
# Vector of x-values
x <- seq(0, 1, by = 0.1)
  
# Calling qnbinom() Function
y <- qnbinom(x, size = 100, prob = 0.5)
y

输出

 [1]   0  82  88  92  96  99 103 107 112 118 Inf

例2 :

# R program to compute value of
# Negative Binomial Quantile Function
  
# Vector of x-values
x <- seq(0, 1, by = 0.01)
  
# Calling qnbinom() Function
y <- qnbinom(x, size = 100, prob = 0.8)
  
# Plot a graph
plot(y)

输出:

在R语言编程中计算负二项式量化函数的值 - qnbinom函数

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程