शुरू करेंमुफ़्त में शुरू करें

Bernoulli trials

A Bernoulli trial is a random experiment with two possible outcomes: success and failure.

You will imitate the shots of basketball players with various skill levels. Let's assume that the value 1 represents a goal and the value 0 a miss. The outcomes of the shots might be presented as a vector. For example, the vector c(1, 1, 0) means that the player has scored twice and then missed once.

The Bernoulli distribution is a particular case of the binomial distribution where a single trial is conducted (so size amounts to 1).

Recall that bar plots are great for visualizing discrete distributions.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Practicing Statistics Interview Questions in R

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

set.seed(123)

# Generate the outcomes of basketball shots
shots <- ___(n = ___, size = ___, prob = ___)
print(shots)

# Draw the frequency chart of the results
___(table(___))
कोड संपादित करें और चलाएँ