Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Random Variables and Probability Distributions | Section
Exploring Probability Theory
セクション 1.  8
single

single

bookRandom Variables and Probability Distributions

メニューを表示するにはスワイプしてください

A random variable is a function that assigns a numerical value to each outcome of a random experiment. Random variables are classified as either discrete or continuous.

A discrete random variable can take on a finite or countably infinite set of possible values. For instance, the number of heads when flipping three coins is a discrete random variable, as its possible values are 0, 1, 2, or 3.

A continuous random variable can take on any value within a given interval or collection of intervals. For example, the exact height of a randomly selected person is a continuous random variable, as it can be any real number within a certain range.

The probability mass function (PMF) describes the probability that a discrete random variable is exactly equal to some value. For a discrete random variable XX, the PMF is defined as P(X=x)P(X = x). For example, if XX is the roll of a fair six-sided die, the PMF assigns a probability of 1/61/6 to each possible outcome from 1 to 6.

The probability density function (PDF) is used for continuous random variables. It describes the relative likelihood for this random variable to take on a given value. Unlike the PMF, the PDF itself does not give probabilities directly; instead, the probability that the variable falls within a particular interval is given by the area under the curve of the PDF over that interval. For example, the time between bus arrivals might follow an exponential distribution with a specific PDF.

Understanding the distinction between PMF and PDF is crucial for working with different types of random variables and their distributions.

123456789101112131415161718
import matplotlib.pyplot as plt import numpy as np # Simulate a discrete random variable: rolling a fair six-sided die 1000 times np.random.seed(42) n_trials = 1000 outcomes = np.random.choice([1, 2, 3, 4, 5, 6], size=n_trials) # Calculate the PMF (empirical probabilities) values, counts = np.unique(outcomes, return_counts=True) pmf = counts / n_trials # Plot the PMF plt.bar(values, pmf, tick_label=values) plt.xlabel("Die Face") plt.ylabel("Probability") plt.title("Empirical PMF of a Fair Six-Sided Die") plt.show()
copy
question mark

Which statements about random variables, PMF, and PDF are correct?

すべての正しい答えを選択

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  8
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt