Textbook Math Notes
Statistics is concerned with real-world data and making practical decisions based on the results. Statistics is about drawing conclusions from data.
Probability is about understanding the likelihood of different outcomes. Probability is concerned with theoretical concepts and the underlying laws of randomness.
- Sample Space:
- The collection of all possible outcomes of an experiment
- Random Variable:
- An assignment of probabilities to the outcomes in a sample space
- In probability theory, a random variable is a variable whose possible values are outcomes of a random event. It is a mathematical abstraction that assigns a numerical value to each possible outcome of a random process or experiment.
- Random variables can be classified as either discrete (e.g.number of heads obtained in a series of coin tosses) or continuous (e.g. amount of rainfall in a given area during a specified time period, depending on the nature of the possible outcomes)
- Probability Distribution:
- Probability distribution is a mathematical function that describes the likelihood of obtaining various outcomes in a random experiment
- Large variety of them, but two fundamental forms are discrete and continuous
- Expected Value aka Expectation aka E(X):
- It represents the long-term average of the values that would be obtained from repeated trials of a random experiment.
- For example, if you toss a fair coin repeatedly, the expected value of the number of heads obtained in each toss would be 0.5, since there is an equal probability of obtaining heads or tails. [Note: essentially Probability's version of the mean]
- E(X) for discrete random variables:
- The expected value of a discrete random variable X is denoted as E(X) and is calculated as the weighted average of the possible outcomes of X, where the weights are the probabilities of those outcomes.
- That is, E(X) = Σ x • P(X=x)
- Where x represents each possible value of X
- And P(X=x) is the probability of obtaining that value
- E(X) for continuous random variables:
- To calculate the expected value of a continuous random variable, you need to integrate the product of the random variable and its probability density function (PDF) over the range of possible values (example 1; example 2)
- To take an integral, you need to use integration, which is a fundamental concept in calculus. Integration is the reverse process of differentiation, and is used to calculate the area under a curve or to find the antiderivative of a function. [Note: different ways to do this; more calculus knowledge needed]
- Btw: In calculus, "dx" represents an infinitesimal change in the variable x. It is used in integrals to indicate the variable with respect to which the integration is being done. The dx is placed after the function that is being integrated, such as ∫f(x)dx. Also f(x) is the probability density function of X.
- The notation used to represent integration is the integral sign (∫), and the process of evaluating an integral is called integration.
- For example, suppose we have a continuous random variable X with probability density function: f(x) = 3x2, 0 ≤ x ≤ 1
- To calculate the expected value of X, we need to integrate the product of X and its probability density function over the range [0, 1]:
- E(X) = ∫ xf(x) dx = ∫ x(3x2) dx = ∫ 3x3 dx
- E(X) = [3/4 x4] evaluated from 0 to 1
- E(X) = [3/4 (1)4] - [3/4 (0)4] = 3/4; Therefore, the expected value of X is 3/4
- Variance or V(X): Measures how much the values in the data actually differ from the mean
- Calculated as:
- E(X2) - E(X)2 or (sum of each outcome)2 • (probability of each outcome) - (expectation)2
- Standard Deviation: σ (sigma) is commonly used in statistics to represent the standard deviation of a probability distribution or a sample. The standard deviation is a measure of the amount of variation or spread in a set of data.
Binomial distribution: a probability distribution that describes the number of successes in a fixed number of independent trials, where each trial has the same probability of success. Some examples of binomial experiments include flipping a coin a fixed number of times and counting the number of heads, or rolling a die a fixed number of times and counting the number of times a specific number is rolled.
- Notation:
- n = number of identical Bernoulli trials performed
- p = probability each one ends in success
- We denote this distribution as B(n, p). The random variable in a binomial distribution is the number of successes in the n trials.
- [Note: k = number of successful outcome inquiring about?]
- Calculated as:
- P(X = k) = (n choose k) * p^k * (1 - p)^(n - k)
- Example:
- Suppose we are flipping a fair coin 10 times, and we want to know the probability of getting exactly 5 heads.
- P(X = 5) = (10 choose 5) * 0.5^5 * (1 - 0.5)^(10 - 5) = 252 * 0.5^5 * 0.5^5 = 0.2461 or 24.61%
- For 10 choose 5 portion, we use "n choose k = n! / (k! * (n - k)!)" where n is the total number of trials and k is the number of successful trials, so 10 choose 5 = 10! / (5! * (10 - 5)!) = 252
- Also, the expectation/mean/μ of a binomial distribution =np, and the variance/σ^2 = np(1-p)
Calculus
- Functions
- In simple terms, a function takes an input, performs some operations or computations on it, and produces an output.
- The input values, also known as the independent variable, are typically denoted as x, and the corresponding output values, known as the dependent variable, are denoted as f(x) or y.
- To understand the notation, consider a specific example: f(x) = 2x + 1
- f(x) represents a linear function that takes an input value x, multiplies it by 2, and adds 1 to the result
- the value of the function f(x) at x = 3 is 7.
- Derivatives
- Measure the rate of change and slope of a function at a given point.
- Taking Derivatives: Rules
- Power rule: For a term of the form ax^n, the derivative is given by d/dx(ax^n) = nax^(n-1)
- Sum rule: The derivative of the sum of two functions is equal to the sum of their derivatives
- Constant Rule: The derivative of a constant function is always zero. It indicates that the slope (rate of change) of a constant function is always zero since the function doesn't change with respect to the input variable x.