← Back to R Course | Chapter 9: Statistics | Lesson 7 of 7

Probability Distributions क्या हैं

Probability distributions describe करते हैं अलग-अलग results कितने likely हैं, यह जानने की तरह कि ज़्यादातर लोग लगभग average height के हैं और कम extremely tall। R के पास इनसे values draw करने और chances work out करने के लिए built-in tools हैं।
Syntax
r
dnorm(x, mean, sd)    # density
pnorm(q, mean, sd)    # cumulative probability
qnorm(p, mean, sd)    # quantile
rnorm(n, mean, sd)    # random values

Probability Distributions

R के पास common probability distributions के लिए built-in functions हैं, एक d/p/q/r naming convention follow करते हुए -- rnorm() random normal values generate करता है, dnorm() density देता है, pnorm() cumulative probability देता है, और qnorm() quantile देता है।

यही same pattern runif(), rbinom(), और rpois() जैसी दूसरी distributions पर apply होता है। यह built-in statistical machinery एक major वजह है कि R data analysis के लिए popular है।

Note:
  • Prefix आपको बताता है function क्या करता है:
  • r=random draw
  • d=density
  • p=cumulative probability
  • q=quantile।

उदाहरण: Probability Distributions

markup
set.seed(1)
samples <- rnorm(5, mean = 0, sd = 1)
print(samples)

cat("P(X <= 0) for standard normal:", pnorm(0), "\n")
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. Prefixes mix up करना, जैसे एक point तक probability के लिए dnorm इस्तेमाल करना, जब d density है, p cumulative probability, q quantile, और r random draws।
  2. यह भूल जाना कि sd standard deviation है और rnorm(5, mean = 0, sd = 4) को एक variance pass करना।
  3. यह उम्मीद करना कि rnorm() हर run में same numbers देगा, जब इसे set.seed() चाहिए।
चैप्टर सारांश
  • mean, median, standard deviation, min, max, और range जैसी basic statistics data describe करती हैं।
  • summary() और cor() overviews और correlations देते हैं।
  • sample(), set.seed(), और probability distributions random data support करते हैं।
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.