Probability Statistics

Cover

1. Lecture One - Definition of Terms Basics (2).pptx

Table of contents

  1. Lecture 1: Definition of Terms & Basics
  2. Types of statistical applications: Numeric Descriptions and Inferential
  3. Uses of statistics in a wide variety of fields

1. Lecture 1: Definition of Terms & Basics

1.1 Statistics: Definition and Scope

Statistics is defined as a practice or science that deals with the collection and analysis of large quantities of data. It is a branch of applied mathematics concerned with the collection and interpretation of quantitative and qualitative data, using probability theory to estimate population parameters.

The field has a broad scope of applications in business, government, physical, and social sciences, playing a key role in critical thinking.

  • Core function: Statistics involves the collection, classification, analysis, and interpretation of information or data.
  • Scientific activity: It is a science of learning from data, measuring, controlling, and communicating uncertainty.
  • Methodological discipline: Statistics provides a coherent set of ideas and tools for dealing with data empirically, especially in complex and uncertain situations.

1.2 Purpose of Statistical Calculations

Statistics involves two main processes: describing data sets and drawing conclusions about these datasets based on predictions.

  • Descriptive Statistics: This process quantifies, describes, and summarizes data. It uses numeric and graphical descriptions to identify patterns within a dataset and presents information conveniently, often employing measures of location and dispersion.
  • Inferential Statistics: This process uses a data sample (a subset) to make inferences about the population (the whole). It employs sample data to make estimates, decisions, predictions, or other generalizations about a larger set of data, often relying on probability theory.

1.3 What Statisticians Do

Statisticians use data to solve problems across a wide variety of fields. They apply mathematical tools and statistical knowledge to address issues in areas such as business, social sciences, economics, medicine, politics, and ecology.

  • Problem-solving: Statisticians work individually or in interdisciplinary teams to solve problems using data.
  • Advancement: Through education and research, they push the frontiers of statistics, mathematics, and probability.
  • Guidance: They provide crucial guidance on the reliability of information and the trustworthiness of predictions.

1.4 History of Statistics and Data

The history of statistics dates back over 200 years, initially referring to a country's measurable political characteristics like population, taxes, and provinces.

  • Data: Data represents every piece of information gathered. It consists of observed values of a variable, such as the color or brand of cars parked on campus. Data can be any observable and measurable fact or group of facts used for calculations and hypothesis testing. Each data object or unit within a population possesses many characteristics.

1.5 Variables

A variable is any value whose characteristic is subject to change.

  • Definition: A variable is a characteristic of a unit within a population that can change or vary.
  • Examples: For a group of students enrolled in a statistics course, characteristics like the brand of calculator, the number of textbooks purchased, the price of textbooks, and the distance from their residence to the university are all variables. These variables can take on different values (e.g., calculator brands like Sharp or others, prices that vary, distances that differ).

1.6 Planning and Conducting a Statistical Study

Conducting a statistical study involves several key steps to ensure reliable and meaningful results.

  • Problem Understanding: The first step is to understand the nature of the problem, including research objectives and questions, before data collection begins.
  • Measurement Decisions: Researchers must decide what information is needed, carefully define variables, and select appropriate methods for determining variable values.
  • Data Collection: This involves determining if existing data sources (secondary data) are adequate or if new data must be collected (primary data).
  • Data Summary and Analysis: This stage includes graphical and numerical summarization of the data, followed by formal data analysis using appropriate inferential statistical methods.
  • Interpretation of Results: The final step involves drawing conclusions from the analyzed results.

1.7 Parameter vs. Statistic

A parameter and a statistic are both numbers that describe characteristics, but they refer to different groups.

TermDescriptionNotation
ParameterA number that describes a population characteristic.µ, ρ, σ
StatisticA number that describes a sample characteristic.s, x̄
  • Example: In a US presidential election year with 12
Cover

1. Probability.docx

Table of contents

  1. Probability
  2. Conditional Probability
  3. Probability Trees (without replacement)
  4. Answer

1. Probability

A probability measures how likely an event is to occur. It is expressed as a decimal, fraction, or percentage, and always falls between 0 (no chance) and 1 (absolute certainty).

1.1 Basic Probability

  • Probability: A numerical measure of the likelihood of an event happening.
  • Range: Probabilities are always between 0 and 1, inclusive.
  • 0 indicates an impossible event.
  • 1 indicates a certain event.
  • Notation: Probability is often written as P(event).

1.2 Probability Trees

Probability trees are diagrams used to visualize and calculate the probabilities of sequential events.

  • Branch Sum: The probabilities on all branches originating from a single point must add up to 1.
  • Calculating Path Probability: To find the probability of a specific sequence of events, multiply the probabilities along the branches of that path.
  • Calculating Total Probability: To find the probability of an event that can occur through multiple paths, add the probabilities of those individual paths.

1.3 Example: Charlie's Lateness

The chance of rain this week is 25%. If it rains, Charlie is late to class 20% of the time.

If it isn't raining, Charlie is late to class 10% of the time.

  • P(raining and Charlie is late): This is calculated by multiplying the probability of rain by the probability of Charlie being late given it rains.
  • P(raining and late) = P(rain) × P(late | rain) = 0.25 × 0.20 = 0.05
  • P(Charlie is not late to class): This requires considering two scenarios: it rains and Charlie is not late, or it does not rain and Charlie is not late.
  • P(not late) = P(raining and not late) + P(not raining and not late)
  • P(not late) = (P(rain) × P(not late | rain)) + (P(not raining) × P(not late | not raining))
  • P(not late) = (0.25 × 0.80) + (0.75 × 0.90) = 0.20 + 0.675 = 0.875

1.4 Example: Bailey's Skiing

Bailey's probability of making a run without crashing is 0.6. If she crashes on the first run, her crash probability on the second run is 0.20.

If she doesn't crash on the first run, her crash probability on the second run is 0.70.

  • P(Bailey crashes into no one on 2 runs): This means she does not crash on the first run AND does not crash on the second run.
  • P(no crash on run 1 and no crash on run 2) = P(no crash on run 1) × P(no crash on run 2 | no crash on run 1) = 0.6 × 0.70 = 0.42
  • P(Bailey has at least one crash): This is the complement of having no crashes on either run.
  • P(at least one crash) = 1 - P(no crashes on either run) = 1 - 0.42 = 0.58
  • P(she crashes on the third run): Given the probability of crashing on the first three runs is 0.0128. This implies a calculation involving the probabilities of crashing on each of the three runs.

2. Conditional Probability

Conditional probability is used when the likelihood of an event occurring depends on another event that has already happened. It is denoted as P(A | B), meaning the probability of event A occurring given that event B has already occurred.

2.1 Definition of Conditional Probability

  • Conditional Probability: The probability of an event occurring, given that another event has already occurred.
  • Notation: P(A | B) represents the probability of event A happening, given that event B has already happened.

2.2 Example: Frog in the Well

A frog climbing out of a well is affected by the weather. The probability of rain is 1/5.

When it rains, the frog falls back down the well with a probability of 1/10. In dry weather, the frog falls back down with a probability of 1/25.

  • Find the probability that given the frog falls, it was a rainy day: This requires calculating P(rain | fall).
  • P(fall) = P(fall and rain) + P(fall and dry)
  • P(fall) = (P(rain) × P(fall | rain)) + (P(dry) × P(fall | dry))
  • P(fall) = (0.20 × 0.10) + (0.80 × 0.04) = 0.02 + 0.032 = 0.052
  • P(rain | fall) = P(rain and fall) / P(fall) = 0.02 / 0.052 ≈ 0.385

3. Probability Trees (without replacement)

Probability trees are also used for scenarios where events occur without replacement, meaning the outcome of one event affects the probabilities of subsequent events.

3.1 Example: Marbles in a Bag

A bag contains 2 blue and 3 red marbles. The chance of drawing a blue marble is initially 2 in 5.

After one marble is removed, the probabilities for the next draw change.

  • If a red marble was drawn first, the chance of drawing a blue marble next is 2 in 4.
  • If a blue marble was drawn first, the chance of drawing a blue marble next is 1 in 4.

3.2 Example: Fish Bowl

A fish bowl holds six angelfish and five clownfish. A child removes three fish at random, one at a time.

  • Calculate the probability that all three fish caught were clownfish: This involves multiplying the probabilities of drawing a clownfish on each of the thr
Cover

1. Statistics Practice Test.docx

Table of contents

  1. Multiple Choice Questions
  2. Short Answer Questions
  3. Problem Solving

1. Multiple Choice Questions

1.1 Frequency distribution and histograms

A histogram visually represents the frequency distribution of a dataset. It uses bars to show how often different values or ranges of values occur within the data.

  • Frequency: The number of times a specific value or range of values appears in a dataset.
  • Histogram: A graphical representation where the x-axis typically shows the data values or bins, and the y-axis shows the frequency of those values.

A histogram showing the frequency distribution of scores, with scores ranging from 1 to 6.

The histogram above displays the frequency of scores, with the tallest bar at score 2 indicating it is the most frequent score.

1.2 Raw data analysis

Raw data is the initial collection of information before it is processed or analyzed. Analyzing raw data involves identifying patterns, calculating statistics, and understanding the distribution of values.

  • Mode: The value that appears most frequently in a dataset.

A survey collected the following raw data on the number of televisions in homes: 1, 1, 2, 2, 3, 1, 2, 0, 2, 2, 2, 3, 1, 3, 4, 2. The score with the highest frequency (mode) is: 0 1 2 3 4

1.3 Frequency distribution tables

A frequency distribution table organizes raw data by showing the frequency of each distinct value or group of values. This table helps in understanding the distribution of the data.

  • Frequency distribution table: A table that lists data values or ranges and their corresponding frequencies.

The number of students surveyed for the number of pets owned was 16.

The median number of pets is: 1 0 3 2 4 The modal number of pets (mode) is: 8 1 5 2 7

1.4 Data distribution shapes

The shape of a data distribution, often visualized with a histogram, provides insights into how the data is spread. Common shapes include normal, skewed, and symmetrical distributions.

  • Negatively skewed distribution: A distribution where the tail on the left side is longer or fatter than the right side. The bulk of the data is concentrated on the right.
  • Normally distributed: A symmetrical bell-shaped distribution where most of the data is clustered around the mean, and the mean, median, and mode are approximately equal.
  • Symmetrical distribution: A distribution where the left and right sides are mirror images of each other.

The histogram shows the marks received by a class in a Maths quiz. The distribution represented by the histogram is: negatively skewed normally distributed symmetrical positively skewed None of the above

1.5 Range of a dataset

The range of a dataset is a measure of its spread, calculated as the difference between the highest and lowest values in the dataset.

  • Range: The difference between the maximum and minimum values in a dataset.

Consider the following stem and leaf plot: STEM | LEAF ------- | -------- 0 | 4 5 6 9 1 | 2 3 4 5 7 2 | 1 4 5 6 6 3 | 2 4 9 4 | 5

The range of the above set of data is: 40 41 43 36 4

2. Short Answer Questions

2.1 Question 1: Diving scores analysis

This question requires calculating basic statistical measures from a given set of scores for a diver's final competition. It tests understanding of count, mean, median, mode, and range.

  • Number of dives: 5
  • Mean score: 77.88
  • Median score: 79
  • Modal score: 79
  • Range of scores: 54

2.2 Question 2: Statistical terms definitions

This question asks to match statistical terms with their definitions, assessing comprehension of measures of center and data points.

  • Mean: The average of a data set, calculated by summing all values and dividing by the number of values.
  • Median: The middle value in a data set when the values are arranged in ascending or descending order.
  • Mode: The value that appears most frequently in a data set.
  • Outlier: A data value that is significantly different from other values in the data set.
  • Census: A survey that obtains data from every member of a population.
  • Sample: A subset of a population from which data is collected.
StatementTerm
The __________ is an appropriate measure of centre when outliers are present.Median
The __________ is an appropriate measure of centre when the most common result is significant.Mode
The __________ is an appropriate measure of centre when no extreme values or outliers distort the picture.Mean
An __________ is a data value that is considerably different from the rest of the values in a set of data.Outlier
When we obtain data from the whole population, we conduct a
Cover

2000 Unit 1 Filled In.pdf

1. Introduction to statistical inference and review of basic concepts

This section introduces the fundamental principles of statistical inference, focusing on the distinction between population parameters and sample statistics, and reviews key concepts related to density curves and normal distributions.

1.1 Parameters versus statistics

A parameter is a numerical value that characterizes an entire population. Examples include the population mean (μ\mu), population standard deviation (ω\omega), population variance (ω2\omega^2), and population proportion (pp). In contrast, a statistic (or estimator) is a numerical value computed from sample data. Common examples are the sample mean (xˉ\bar{x}), sample standard deviation (ss), sample variance (s2s^2), and sample proportion (p^\hat{p}). The sample mean is calculated as xˉ=∑xin\bar{x} = \frac{\sum x_i}{n}, and the sample standard deviation is s=∑(xi−xˉ)2n−1s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n-1}}, where nn is the sample size and ∑xi=x1+x2+⋯+xn\sum x_i = x_1 + x_2 + \dots + x_n 3.

Note: Since populations are often very large, the values of parameters are usually unknown. Statistics are used as estimates for these unknown parameters.

1.2 Statistical inference

Statistical inference encompasses methods used to draw conclusions about a population based on sample data. This unit will revisit key inferential techniques learned previously, specifically confidence intervals and hypothesis testing 4.

1.3 Density curves

A density curve is a curve that describes the overall shape of a distribution. The area under a density curve above the x-axis represents the proportion of observations falling within a specific interval. The total area beneath any density curve is always equal to 1. Density curves can represent various distribution shapes, including symmetric, right-skewed, and left-skewed distributions 5.

1.4 Normal distributions

A significant family of density curves is the normal distributions. If a variable XX follows a normal distribution with mean μ\mu and standard deviation ω\omega, this is denoted as X∼N(μ,ω)X \sim N(\mu, \omega) 6.

A normal distribution is fully defined by its mean (μ\mu) and standard deviation (ω\omega):

  • The distribution is centered at μ\mu and is perfectly symmetric around this mean.
  • The standard deviation (ω\omega) quantifies the spread or variability of the distribution. A larger ω\omega results in a shorter and wider density curve 7.

1.5 Standard normal distribution

The standard normal distribution is a specific normal distribution with a mean of 0 and a standard deviation of 1, denoted as Z∼N(0,1)Z \sim N(0, 1) 8.

Any normal variable XX can be transformed into a standard normal variable ZZ using the z-score formula: z=X−μωz = \frac{X - \mu}{\omega} The z-score indicates how many standard deviations an observation is away from the mean 9.

1.6 Probability distributions and the normal curve

The probability distribution of a random variable XX specifies the possible values XX can take and the probabilities associated with those values. If X∼N(μ,ω)X \sim N(\mu, \omega), then XX follows a normal probability distribution. The probability of XX falling within a certain interval corresponds to the area under its density curve within that interval 10.

Probabilities for a normal distribution can be found by standardizing the variable XX to ZZ using the z-score formula (z=x−μωz = \frac{x - \mu}{\omega}) and then using a z-table to find the corresponding areas under the standard normal curve.

Example: If X∼N(10,5)X \sim N(10, 5), the probability P(X<12.5)P(X < 12.5) can be calculated as follows: P(X<12.5)=P(Z<12.5−105)=P(Z<0.50)P(X < 12.5) = P\left(Z < \frac{12.5 - 10}{5}\right) = P(Z < 0.50) Using a z-table, this probability is found to be 0.69150.6915. The z-score of x=12.5x=12.5 is 0.500.50, meaning 12.512.5 is 0.500.50 standard deviations above the mean 11.

2. Distribution of the sample mean and the Central Limit Theorem

This section explores the distribution of the sample mean, detailing its properties and how it is influenced by sample size, culminating in the foundational Central Limit Theorem.

2.1 The sampling distribution of the sample mean

When analyzing data, interest often shifts from individual observations to summary statistics derived from samples, such as the sample mean. To understand the probabilities associated with a sample mean falling within a certain interval, it is crucial to examine the distribution of the sample mean itself. This is achieved by conceptually taking numerous random samples of a fixed size (nn) from a population, calculating the mean for each sample, and then observing the distribution of these calculated means.

2.1.1 Properties of the sampling distribution of the sample mean

Let Xˉ\bar{X} represent the mean of a simple random sample of size nn drawn from a population with mean μ\mu and standard deviation ω\omega. The prope

Cover

2000unit2 Filled In.pdf

1. Matched pairs t procedures (part 1)

Matched pairs t procedures are used for inference on the difference between paired observations, enabling the construction of confidence intervals and the performance of hypothesis tests for the true mean difference between two related measurements or conditions.

1.1 Paired data and its types

Paired data arise when observations are collected in pairs, focusing on the differences between these paired values rather than individual measurements. This structure is employed when:

  • Two different variables are measured for each individual, and the interest lies in the difference between these variables (e.g., STAT 1000 vs. STAT 2000 grades for a student).
  • An individual is measured twice under different conditions or at different times, with the focus on the difference between these repeated measurements (e.g., blood pressure before and after medication).
  • Similar individuals are grouped into pairs, with each member of a pair receiving a different treatment, and the response variable is measured and compared between the pair members (e.g., comparing growth of twin children on different diets).

1.2 The parameter of interest and assumptions for matched pairs t procedures

The primary parameter of interest in matched pairs t procedures is μd\mu_d, the true mean of the differences between paired observations in the population. The core assumptions for employing these procedures are:

  • Normality: The differences between paired observations follow a normal distribution with mean μd\mu_d and standard deviation ωd\omega_d.
  • Independence of Pairs: The pairs themselves are a simple random sample (SRS) from the population of all possible pairs.
  • Dependence within Pairs: Observations are dependent within pairs, meaning they are related in some way.

It is crucial to note that the methods for constructing confidence intervals and conducting hypothesis tests in the matched pairs setting are analogous to the one-sample case, with the key distinction being that the analysis is performed on the differences. The assumption is not that each variable is normal independently, but rather that their differences are normally distributed.

Note: It is sufficient to assume that the differences are normally distributed, not necessarily each individual variable being measured independently 6.

1.3 Confidence intervals for the mean difference

A confidence interval provides a range of plausible values for the true mean difference, μd\mu_d. The formula for a level CC confidence interval is:

xˉd±t∗sdn\bar{x}_d \pm t^{\ast} \frac{s_d}{\sqrt{n}}

Where:

  • xˉd\bar{x}_d is the sample mean of the differences.
  • t∗t^{\ast} is the upper 1−C2\frac{1-C}{2} critical value from the t-distribution with n−1n-1 degrees of freedom. This value satisfies P(∣Tn−1∣<t∗)=CP(\vert T_{n-1} \vert < t^{\ast}) = C.
  • sds_d is the sample standard deviation of the differences.
  • nn is the number of pairs in the sample.
  • t∗sdnt^{\ast} \frac{s_d}{\sqrt{n}} is the margin of error 7.

Example: For a sample of 8 cars, we collect mileage data for regular and premium gasoline, calculating the difference (d=Premium−Regulard = \text{Premium} - \text{Regular}). If xˉd=2\bar{x}_d = 2 mpg, sd=2s_d = 2 mpg, and we want a 95% confidence interval (C=0.95C = 0.95), the degrees of freedom are n−1=8−1=7n-1 = 8-1 = 7. The critical t-value t∗t^{\ast} for a 95% confidence interval with 7 degrees of freedom is 2.365.

The margin of error is 2.365×28≈1.672.365 \times \frac{2}{\sqrt{8}} \approx 1.67. The 95% confidence interval is 2±1.672 \pm 1.67, which results in (0.33,3.67)(0.33, 3.67) miles per gallon 9.

Interpretation: We are 95% confident that the true mean difference in fuel economy between premium and regular gasoline lies between 0.33 and 3.67 miles per gallon. It's important to note that defining the difference as Regular−Premium\text{Regular} - \text{Premium} would yield a negative interval, conveying the same information 11.

1.4 Hypothesis tests for the mean difference

Hypothesis tests are used to determine if there is convincing evidence of a difference between paired observations. The procedure mirrors the one-sample t-test, but on the differences.

The test statistic is calculated as:

t=xˉd−μd0sd/nt = \frac{\bar{x}_d - \mu_{d0}}{s_d / \sqrt{n}}

Where μd0\mu_{d0} is the hypothesized true mean difference under the null hypothesis 12.

Note: For matched pairs hypothesis tests, the null hypothesis is conventionally stated as μd=0\mu_d = 0, implying no difference between the paired measurements.

1.4.1 Right-sided hypothesis test example (P-value method)

Consider the gasoline mileage example, aiming to test if premium gasoline provides better fuel economy on average.

  • Significance Level: ε=0.05\varepsilon = 0.05.
  • Hypotheses: H0:μd=0H_0: \mu_d = 0 vs. Ha:μd>0H_a: \mu_d > 0. The alternative hypothesis is $d = \text{Premium} - \text{Regular} >
Cover

2000 unit 3 Filled In.pdf

1. Introduction to comparing multiple population means and the limitations of pairwise tests

This section introduces the challenges and drawbacks associated with comparing means across multiple populations, particularly highlighting the increased risk of Type I errors and the limited inferential power of relying solely on pairwise hypothesis tests.

1.1 The need for comparing multiple population means

In statistical analysis, the objective often extends beyond comparing a single population mean (as covered in Unit 1) or the means of two populations (as in Unit 2). Frequently, researchers need to compare the means of three or more populations to determine if significant differences exist among them. For instance, one might want to ascertain if the average performance across four different educational programs is the same: μ1=μ2=μ3=μ4\mu_1 = \mu_2 = \mu_3 = \mu_4 3.

1.2 Limitations of pairwise hypothesis testing

A common, albeit flawed, approach to comparing multiple population means is to conduct a series of pairwise hypothesis tests. If there are II populations, the number of unique pairwise comparisons is given by the combination formula (I2)\binom{I}{2}. For example, with four populations, one would need to perform six pairwise tests: H0:μ1=μ2H_0: \mu_1 = \mu_2 vs. Ha:μ1≠μ2H_a: \mu_1 \neq \mu_2, H0:μ1=μ3H_0: \mu_1 = \mu_3 vs. Ha:μ1≠μ3H_a: \mu_1 \neq \mu_3, and so on, up to H0:μ3=μ4H_0: \mu_3 = \mu_4 vs. Ha:μ3≠μ4H_a: \mu_3 \neq \mu_4 4.

1.2.1 Increased risk of Type I errors

Conducting multiple hypothesis tests significantly inflates the probability of committing at least one Type I error (falsely rejecting a true null hypothesis). If each pairwise test is conducted at a significance level ω=0.05\omega = 0.05, there is a 5% chance of a Type I error for each individual test. Assuming independence (which is an approximation in this context), the probability of correctly failing to reject the null hypothesis in all kk independent tests is (1−ω)k(1 - \omega)^k. For six pairwise tests with ω=0.05\omega = 0.05, this probability is 0.956≈0.7350.95^6 \approx 0.735. Consequently, the probability of making at least one Type I error across these six tests is 1−0.956≈0.2651 - 0.95^6 \approx 0.265, or 26.5%. This problem becomes more pronounced as the number of populations increases, leading to a rapid escalation in the number of pairwise tests and thus the overall risk of a Type I error. [5-6]

Reminder: As the number of populations (II) grows, the number of pairwise tests, (I2)\binom{I}{2}, increases quadratically. This exacerbates the multiple comparison problem, substantially raising the chance of a Type I error.

1.2.2 Limited inferential scope

Pairwise tests provide information about the likelihood of two specific means differing by a certain amount, given the null hypothesis that these two means are equal. However, this does not directly address the primary research question: whether there is evidence that all population means differ, or if at least one mean differs from the others, when considering all populations simultaneously 7.

Example: Consider side-by-side boxplots of four populations. If a pairwise test between population 1 and population 4 shows a significant difference, it might lead one to conclude that μ1≠μ4\mu_1 \neq \mu_4. However, when viewing all four distributions together, this difference might be expected due to chance variation across multiple samples. A test that considers all four means simultaneously provides a more appropriate context for assessing overall differences. [8-10]

1.3 Towards a simultaneous comparison of means

To address the limitations of pairwise testing, statistical methods for comparing multiple population means typically involve a two-step process:

  1. An overall test: This initial step aims to detect if there is any evidence of a difference among all the population means. This is generally a more straightforward procedure, though calculations might be complex. The hypotheses tested are:

    • H0:μ1=μ2=⋯=μIH_0: \mu_1 = \mu_2 = \dots = \mu_I (All population means are equal)
    • Ha:H_a: At least one μi\mu_i differs. (Not all population means are equal) [11-12]
Cover

2025_중간고사문제와정답.pdf

📚 2025_중간고사문제와정답.pdf

Brief overview

This document provides a comprehensive review of probability theory concepts, focusing on mathematical derivations, proofs, and various probability distributions. It serves as an essential study aid for understanding and applying fundamental probabilistic principles.

Key points

  • Overview of derivations and proofs in probability theory (Part 1).
  • Detailed exploration of derivations and proofs in probability theory (Part 2).
  • Understanding properties of Poisson, exponential, and Pareto distributions.
  • Analysis of Gamma and uniform probability distributions and their PMFs.
  • Calculating probabilities and expected values for discrete and continuous variables.

1. Derivations and proofs in probability theory (part 1)

1.1 Probability calculations for random variables

This section covers calculating probabilities for discrete random variables. It involves determining all possible values and their corresponding probabilities.

The sum of all probabilities must equal one. The expected value, denoted as E[X]E[X], is calculated by summing the product of each possible value and its probability.

  • Random variable values: The possible outcomes for the random variable XX.
  • Permutations and combinations: Used to determine the total number of arrangements and the number of favorable outcomes.
  • Probability calculation: The ratio of favorable outcomes to total possible outcomes.

Example: For a scenario with 6 items, where 2 specific items (A,BA, B) must be placed at the ends, the total arrangements are 6!6!. If AA and BB are at the ends, the remaining 4 items can be arranged in 4!4! ways. The arrangements ABAB and BABA at the ends are distinct.

Example:

📝 Example: Calculate the probability of having no AA or BB together (X=0X=0) when arranging 6 items including AA and BB.

  • Total arrangements: 6!6!
  • Cases with no AA or BB together: Consider AA and BB as a block. The number of arrangements for ABAB or BABA is 22. For each, the remaining 4 items can be arranged in 4!4! ways.
  • Total arrangements with AA and BB together: 2×4!2 \times 4!.
  • Probability P(X=0)P(X=0): This is more complex than direct calculation and involves analyzing specific placements. The provided solution uses a direct calculation based on analyzing specific case structures.
  • The probability P[X=0]P[X=0] is calculated as 2×5!/6!=1/32 \times 5! / 6! = 1/3. This implies that AA and BB are not adjacent. The logic for X=0X=0 involves treating AA and BB as if they are not next to each other, which is achieved by considering specific placement constraints.

Table: Probability distribution and Expected Value

Random Variable (XX)Probability (P[X=k]P[X=k])k×P[X=k]k \times P[X=k]
01/31/300
14/154/154/154/15
21/51/52/52/5
32/152/156/156/15
41/151/154/154/15
Sum∑P[X=k=1\sum P[X=k = 1E[X=1×4/15+2×1/5+3×2/15+4×1/15=4/3E[X = 1 \times 4/15 + 2 \times 1/5 + 3 \times 2/15 + 4 \times 1/15 = 4/3

The sum of probabilities is ∑k=04P[X=k=1/3+4/15+1/5+2/15+1/15=(5+4+3+2+1)/15=15/15=1\sum_{k=0}^{4} P[X=k = 1/3 + 4/15 + 1/5 + 2/15 + 1/15 = (5+4+3+2+1)/15 = 15/15 = 1. The expected value is E[X=∑k=04kP[X=k=0(1/3)+1(4/15)+2(1/5)+3(2/15)+4(1/15)=0+4/15+6/15+6/15+4/15=20/15=4/3E[X = \sum_{k=0}^{4} k P[X=k = 0(1/3) + 1(4/15) + 2(1/5) + 3(2/15) + 4(1/15) = 0 + 4/15 + 6/15 + 6/15 + 4/15 = 20/15 = 4/3.

1.2 Arrangements and conditional probability

This section deals with probability problems involving arrangements of items, particularly balls of different colors. It also introduces conditional probability and Bayes' theorem in the context of genetic inheritance.

  • Arrangement of items: Calculating the number of ways to arrange a set of objects, considering identical items. This uses factorials.
  • Conditional probability: The probability of an event occurring given that another event has already occurred.
  • Bayes' theorem: Used to update the probability of a hypothesis based on new evidence.

Formula: P(A∣B)=P(A∩B)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}

Example: Balls in an urn A bag contains 5 red, 7 blue, and 4 green balls.

  • Probability of 3 different colors in a row:
Cover

23 (Apr 14) MGSC 291 Regularization 3 & Exam 3 Review HZ.pdf

1. Introduction to regularization and exam review

This section introduces the concept of regularization, with a specific focus on Lasso regression, and serves as a review for Exam 3, covering topics from weeks 11, 12, and 13.

1.1 Regularization: The Lasso regression example

Regularization techniques are employed to prevent overfitting in statistical models by adding a penalty term to the loss function. Lasso (Least Absolute Shrinkage and Selection Operator) regression is a prominent form of regularization that not only shrinks coefficients towards zero but also has the ability to perform feature selection by setting some coefficients to exactly zero.

1.1.1 Lasso cost function and scaling

The standard Lasso cost function aims to minimize the sum of the residual sum of squares and a penalty proportional to the sum of the absolute values of the coefficients:

Minimize1ndev(β)+λ∑j∣βj∣\text{Minimize} \quad \frac{1}{n} \text{dev}(\beta) + \lambda \sum_{j} |\beta_j|

where dev(β)\text{dev}(\beta) is a measure of model deviance, λ\lambda is the regularization parameter controlling the strength of the penalty, and ∣βj∣|\beta_j| is the absolute value of the jj-th coefficient.

A crucial consideration for Lasso regression is the scale of the covariates. Since all βj\beta_j are penalized by the same λ\lambda, variables with larger scales can be unfairly penalized more. To address this, the penalty term is often adjusted by the standard deviation of the corresponding covariate:

Minimize1ndev(β)+λ∑jsd(xj)∣βj∣\text{Minimize} \quad \frac{1}{n} \text{dev}(\beta) + \lambda \sum_{j} \text{sd}(x_j) |\beta_j|

This standardization ensures that each βj\beta_j's penalty is measured on the scale of a one standard deviation change in xjx_j, making the model fit invariant to the units of measurement (e.g., meters vs. feet).

Note: The standardize=TRUE argument in packages like gamlr and glmnet implements this scaling by default. It is generally recommended unless dealing with exclusively indicator variables for categorical features where standardization might be undesirable.

1.1.2 The free argument in gamlr

The gamlr package offers a free argument that allows specific coefficients to be unpenalized. This is useful when certain variables are deemed essential for the model and their coefficients should be estimated without any shrinkage towards zero. For instance, in a sales prediction model, log(price) might be a variable that you want to include with an unpenalized coefficient.

Example: fitOJfree <- gamlr(x=xOJ, y=log(ojdfUSDsales), free="log(price)")

1.1.3 Handling missing data with gamlr

Missing data is a common challenge in real-world datasets. The gamlr package provides the naref function to address this:

  • For factor variables: Missing values are treated as a separate category by setting NA as the reference level. This ensures that sparse.model.matrix creates a model matrix column for every other factor level.
  • For quantitative variables: The impute=TRUE argument can be used. The imputation strategy (zero imputation or mean imputation) is determined by the pzero argument.
    • If the proportion of zeros in the non-missing entries is greater than pzero (default is 0.5), zero imputation is performed.
    • Otherwise, mean imputation is used.
    • Setting pzero=0 forces zero imputation.

Important: Never impute missing response variable values; instead, drop those observations from the analysis.

1.2 Exam 3 Review

This section serves as a guide for reviewing topics pertinent to Exam 3, focusing on material from weeks 11, 12, and 13. The key concepts likely to be covered include:

  • Regularization techniques: Understanding the principles behind L1 (Lasso) and L2 (Ridge) regularization, their objective functions, and their impact on model coefficients and feature selection.
  • Lasso Regression in practice: Application of Lasso using packages like gamlr or glmnet, including data preparation (handling missing values, feature engineering), model fitting, and interpretation of results.
  • Model Selection Criteria: Familiarity with information criteria such as AIC (Akaike Information Criterion), BIC (Bayesian Information Criterion), and AICc (Corrected AIC) for selecting the best model from a set of candidates, particularly in the context of regularization paths.
  • Interpretation of Regularization Paths: Understanding how to visualize and interpret model performance across a range of λ\lambda values (e.g., using path plots) and how to identify the optimal λ\lambda based on selected criteria.
  • Handling of Variables: Strategies for dealing with different types of variables, including factors, quantitative variables, and the implications of feature scaling.
  • gamlr package specifics: Knowledge of key arguments within the gamlr function such as family, free, standardize, and lmr (lambda minimum ratio).

1.2.1 Example: Ames

Cover

2.3 Collection of Environmental Data use this one.pptx

Table of contents

  1. Collection of environmental data

1. Collection of environmental data

1.1 Descriptive statistics

Descriptive statistics are summary coefficients that describe the core features of a dataset, making large amounts of raw data easy to understand at a glance. They focus strictly on summarizing the exact data you have.

  • Parameter: A numerical characteristic describing an entire population.
  • Statistic: A numerical characteristic calculated from a sample.

The key components of descriptive statistics include:

  • Measures of Central Tendency: These identify the center or typical value of a dataset. Examples include the mean (average), median (middle value), and mode (most frequent value).
  • Measures of Spread (Variability): These indicate how dispersed or spread out the data points are around the center. Examples include range (difference between highest and lowest values), variance, and standard deviation.
  • Frequency Distribution: These show how often each value or range of values occurs. Examples include tables, histograms, bar charts, and pie charts.

A financial chart displaying stock market data with multiple lines representing different indices and their fluctuations over time.

1.2 Standard deviation

Standard deviation is a measure of how spread out the numbers in a dataset are from the average (mean). It indicates whether data points are tightly clustered around the center or scattered widely.

  • Low Standard Deviation: Data points are close to the average, indicating consistency and reliability.
  • High Standard Deviation: Data points are spread far from the average, indicating variation and inconsistency.

Imagine two classes with an average test score of 75%.

  • Class A: Scores like 74, 75, 75, 76, 75 have a low standard deviation because scores are tightly packed around the average.
  • Class B: Scores like 40, 60, 75, 90, 100 have a high standard deviation because scores are widely scattered from the average, despite the same mean.

1.3 Inferential statistics

Inferential statistics use a sample to make predictions or generalizations about a broader population. This involves two main processes:

  • Estimation: Using sample data to estimate population parameters.
  • Hypothesis Testing: Making decisions about a population based on sample results.

1.4 Collecting data

When planning an investigation, data collection methods must be considered. Data can be categorized in several ways:

TypeDescriptionExamples
Qualitative DataNon-numerical, descriptive data.Colors, textures, opinions
Quantitative DataNumerical data.Number of trees, temperature, speed
Discrete DataNumerical data with a finite number of whole number values.Number of cars, number of students
Continuous DataNumerical data with infinite possibilities, can take any value.Temperature, time, height

Data can also be classified by its source:

  • Primary Data: Data collected by you or your research group.
  • Secondary Data: Data already collected by others but relevant to your investigation (e.g., from the internet, books, past studies).

1.5 Sampling

Collecting data from an entire population is often impractical due to cost and time constraints. Therefore, a sample is taken, which should be representative of the target population.

The target population is the subset of people or organisms to which the study's conclusions can be applied.

1.6 Types of sampling

Sampling methods can be adapted to the spatial nature of data collection:

  • Point sampling: Data collection at an exact point.
  • Line sampling: Data collection along a line or transect.
  • Area or quadrat sampling: Data collection within defined quadrants.

1.7 Examples of sampling techniques

Point intercept sampling involves dropping a vertical pin at regular intervals along a line and recording the species that touch the pin.

Area or quadrat sampling is used to study vegetation in a beach dune environment. A measuring tape is laid out inland from the high-tide mark, and plant species are recorded at specific intervals (e.g., every 5 meters).

This method helps show how environmental factors change over a gradient, influencing species distribution.

This diagram illustrates four different sampling methods: simple random sample, systematic sample, stratified sample, and cluster sample, using icons of people.

Cover

2. Lecture Two - Data Organization (1).pptx

Table of contents

  1. Data Organization
  2. Graphical Representation
  3. Stem and Leaf
  4. Bar Graph

1. Data Organization

1.1 Raw data and arrays

Raw data consists of a group of numbers that have not been organized numerically. An array is a specific arrangement of this raw numerical data in either ascending or descending order.

Organizing data numerically helps in understanding the dataset more effectively.

1.2 Frequency tables

A frequency table is a method for organizing data by counting the number of observations that fall into a series of class intervals. These intervals cover the total range of observations.

While grouping data in a frequency table simplifies it, some of the original detail present in an array is lost.

The class frequency represents the count of observations whose values fall between the lower and upper limits of a specific class interval.

1.3 Constructing a frequency table

Constructing a frequency table involves several steps to systematically organize data.

1.4 Step 1: Calculate the range

The range of a dataset is the difference between the maximum and minimum data values. Range = Maximum data value – Minimum data value.

1.5 Step 2: Decide the number of class intervals

The number of class intervals, often denoted by kk, should be chosen to adequately represent the data. A common guideline is to find the smallest integer kk such that 2k>n2^k > n, where nn is the total number of observations.

For example, if the total number of observations is 56, then 6 or more class intervals might be appropriate.

1.6 Step 3: Determine the class width

The class width is the size of each interval. It is calculated by dividing the range by the desired number of class intervals.

The result is often rounded up to a convenient value to ensure all data points are covered. Class width = Range / Number of class intervals.

1.7 Step 4: Determine the class intervals

The first class interval typically starts with a lower limit that is less than or equal to the minimum data value. The upper limit of this interval is found by adding the class width to the lower limit.

Class intervals should not overlap and are often denoted using notation like 'lower limit - < upper limit'.

1.8 Frequency distribution

Subsequent class intervals continue this pattern, with the lower limit of a new interval being the upper limit of the previous one. The class width remains constant throughout the table.

This process continues until the final class interval encompasses the maximum data value.

Class IntervalFrequency
20 - < 255
25 - < 308
30 - < 3512
35 - < 4010
40 - < 456
45 - < 503

1.9 Important points on frequency distribution

When constructing frequency tables, several points are crucial for accurate representation.

  • Non-overlapping intervals: Class intervals must not overlap to ensure each observation falls into only one category.
  • Coverage: The final class interval must contain the maximum data value to include all observations.
  • Uniqueness: There is no single "correct" frequency table; different choices for the number of intervals or class width can lead to different, yet valid, tables.
  • Mode and modal class: The observation with the greatest frequency is called the mode. The class interval with the highest frequency is known as the modal class.

2. Graphical Representation

2.1 Graphical representation of data

Graphical methods provide a visual way to understand data distributions and characteristics. Common graphical tools include histograms and bar graphs, which transform frequency distribution tables into visual formats.

This line chart displays the relative cumulative age frequencies, showing the percentage of frequencies for different age groups.

2.2 Histogram

A histogram is a graph that presents quantitative data as a series of adjacent rectangles.

  • Construction: The base of each rectangle is centered at the class mark (midpoint) of the interval.
  • Continuity: There are no gaps between the rectangles because the data is continuous.
  • Axes: The horizontal axis is labeled with class intervals, and the vertical axis is labeled with frequencies or relative frequencies.
  • Usefulness: Histograms are particularly useful for large datasets with quantitative variables.

2.3 Shape of the histogram and characteristics

The shape of a histogram provides insights into the data's distribution.

  • Unimodal histogram: Has a single peak, indicating a single most frequent class interval. A bell-shaped histogram is a special type of unimodal and symmetric distribution.