Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Data Visualization
  • Statistics in R
  • Machine Learning in R
  • Data Science in R
  • Packages in R
  • Data Types
  • String
  • Array
  • Vector
  • Lists
  • Matrices
  • Oops in R
Open In App
Next Article:
Compute the Negative Binomial Density in R Programming - dnbinom() Function
Next article icon

Compute the Negative Binomial Density in R Programming - dnbinom() Function

Last Updated : 25 Jun, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report
dnbinom() function in R Language is used to compute the value of negative binomial density. It also creates a plot of the negative binomial density.
Syntax: dnbinom(vec, size, prob) Parameters: vec: x-values for binomial density size: Number of trials prob: Probability
Example 1: Python3 1==
# R program to compute # Negative Binomial Density  # Vector of x-values x <- seq(0, 10, by = 1)  # Calling dnbinom() Function y <- dnbinom(x, size = 10, prob = 0.5) y 
Output:
   [1] 0.0009765625 0.0048828125 0.0134277344 0.0268554688 0.0436401367   [6] 0.0610961914 0.0763702393 0.0872802734 0.0927352905 0.0927352905  [11] 0.0880985260  
Example 2: Python3 1==
# R program to compute # Negative Binomial Density  # Vector of x-values x <- seq(0, 100, by = 1)  # Calling dnbinom() Function y <- dnbinom(x, size = 10, prob = 0.5)  # Plot a graph plot(y) 
Output:

Next Article
Compute the Negative Binomial Density in R Programming - dnbinom() Function

N

nidhi_biet
Improve
Article Tags :
  • R Language
  • R Statistics

Similar Reads

    Compute the Negative Binomial Cumulative Density in R Programming - pnbinom() Function
    pnbinom() function in R Language is used to compute the value of negative binomial cumulative density. It also creates a density plot of the negative binomial cumulative distribution. Syntax: pnbinom(vec, size, prob) Parameters: vec: x-values for binomial density size: Number of trials prob: Probabi
    1 min read
    Compute the Logistic Density in R Programming - dlogis() Function
    dlogis() function in R Language is used to compute logistic density of the distribution. It also creates a plot of the density of the logistic distribution. Syntax: dlogis(vec) Parameters: vec: Vector of x-values for density Example 1: Python3 1== # R program to calculate # logistic density # Create
    1 min read
    Compute the Value of Negative Binomial Quantile Function in R Programming - qnbinom() Function
    qnbinom() function in R Language is used to compute the value of negative binomial quantile function. It also creates a density plot of the negative binomial quantile function. Syntax: qnbinom(vec, size, prob) Parameters: vec: x-values for binomial density size: Number of trials prob: Probability Ex
    1 min read
    Compute the Value of F Density in R Programming - df() Function
    df() function in R Language is used to compute the density of F Distribution over a sequence of numeric values. It also plots a density graph for F Distribution. Syntax: df(x, df1, df2) Parameters: x: Numeric Vector df: Degree of Freedom Example 1: Python3 1== # R Program to compute # F Density # Cr
    1 min read
    Compute the Value of Poisson Density in R Programming - dpois() Function
    dpois() function in R Language is used to compute the Poisson Density for a set of Integer values. It also creates a density plot of poisson distribution.  Syntax: dpois(vec, lambda)Parameters: vec: Sequence of integer values lambda: Average number of events per interval  Example 1:  Python3 # R pro
    1 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences