Probability Distributions क्या हैं
Probability distributions describe करते हैं अलग-अलग results कितने likely हैं, यह जानने की तरह कि ज़्यादातर लोग लगभग average height के हैं और कम extremely tall। R के पास इनसे values draw करने और chances work out करने के लिए built-in tools हैं।
In this page:
Syntax
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
set.seed(1)
samples <- rnorm(5, mean = 0, sd = 1)
print(samples)
cat("P(X <= 0) for standard normal:", pnorm(0), "\n")
Login to try C/C++/Java/PHP code in the editor
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. #}
आम गलतियां
- Prefixes mix up करना, जैसे एक point तक probability के लिए
dnormइस्तेमाल करना, जबddensity है,pcumulative probability,qquantile, औरrrandom draws। - यह भूल जाना कि
sdstandard deviation है औरrnorm(5, mean = 0, sd = 4)को एक variance pass करना। - यह उम्मीद करना कि
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: