STA6349: Applied Bayesian Analysis
The first few lectures come from Mathematical Statistics with Applications, by Wackerly.
We will be covering the following chapters:
Chapter 2: probability theory
Chapter 3: discrete random variables
Chapter 4: continuous random variables
The first few lectures come from Mathematical Statistics with Applications, by Wackerly.
We will be covering the following chapters:
Chapter 2: probability theory
Chapter 3: discrete random variables
Chapter 4: continuous random variables
P[A|B] = \frac{P[A \cap B]}{P[B]},
so long as P[B] > 0.
Notation: P[A|B] is the probability of A given B.
\begin{align*} P[A|B] &= P[A] \\ P[B|A] &= P[B] \\ P[A \cap B] &= P[A] P[B] \end{align*}
Consider the following events in the toss of a single die:
Are A and B independent events?
Are A and c independent events?
Three brands of coffee, X, Y, and Z, are to be ranked according to taste by a judge.
Consider the following events:
If the judge actually has no taste preference and randomly assigns ranks to the brands, is event A independent of events B, C, and D?
Theorem: The Multiplicative Law of Probability
\begin{align*}P[A\cap B] &= P[A] P[B|A] \\ &= P[B] P[A|B]\end{align*}
P[A \cap B] = P[A] P[B]
Theorem: The Additive Law of Probability
P[A \cup B] = P[A] + P[B] - P[A \cap B]
P[A \cup B] = P[A] + P[B]
Theorem: The Complement Rule
\begin{align*} P[A] &= 1 - P[\bar{A}] \\ P[\bar{A}] &= 1 - P[A] \\ 1 &= P[A] + P[\bar{A}] \end{align*}
P[\text{at least one } A_i] = P[A_1] + P[A_2] + P[A_3] - 2 P[A_1 \cap A_2].
The steps used to define the probability of an event:
Define the experiment.
Visualize the nature of the sample points. Identify a few to clarify your thinking.
Write an equation expressing the event of interest (A) as a composition of two or more events, using usions, intersections, and/or complements. Make certain that event A and the event implied by the compsotion represnt the sameset of sample points.
Apply the additive and multiplicative laws of probability in the compositions obtained in step 3 to find P[A].
Of the voters in a city, 40% are Republicans and 60% are Democrats.
Among the Republicans, 70% are in favor of a bond issue, where 80% of the Democrats favor the issue.
If a voter is selected at random in the city, what is the probability that he or she will favor the bond issue?
It is known that a patient with a disease with respond to treatment with probability equal to 0.9.
If three patients with the disease are treated independently, find the probability that at least one will respond.
Partition:
For some positive integer k, let the sets B_1, B_2, ..., B_k be such that
S = B_1 \cup B_2 \cup ... \cup B_k
B_1 \cap B_j = \emptyset, for i \ne j
Then the collection of sets \{B_1, B_2, ..., B_k\} is said to be a partition of S.
A = (A \cap B_1) \cup (A \cap B_2) \cup \ ... \ \cup (A \cap B_k)
Theorem:
P[A] = \sum_{i=1}^k P[A|B_i] P[B_i]
Theorem: Bayes’ Rule
P[B_j | A] = \frac{P[A|B_j] P[B_j]}{\sum_{i=1}^k P[A|B_i] P[B_i]}
An electronic fuse is produced by five production lines in a manufacturing operation. The fuses are costly, are quite reliable, and are shipped to suppliers in 100-unit lots.
All five production lines produce fuses at the same rate and normally produce only 2% defective fuses, which are dispersed randomly in the output.
Unfortunately, production line 1 suffered mechanical difficulty and produced 5% defectives during the month of March.
This situation became known to the manufacturer after the fuses had been shipped.
A customer received a lot produced in March and tested three fuses. One failed.
What is the probability that the lot was produced on line 1?
What is the probability that the lot came from one of the four other lines?
Of the travelers arriving at a small airport, 60% fly on major airlines, 30% fly on privately owned planes, and the remainder fly on commercially owned planes not belonging to a major airline.
Of those traveling on major airlines, 50% are traveling for business reasons, whereas 60% of those arriving on private planes and 90% of those arriving on other commercially owned planes are traveling for business reasons.
Suppose that we randomly select one person arriving at this airport. What is the probability that the person:
is traveling on business?
is traveling for business on a privately owned plane?
arrived on a privately owned plane, given that the person is traveling for business reasons?
is traveling on business, given that the person is flying on a commercially owned plane?
Random variable:
Let Y denote a variable to be measured in an experiment.
Because the value of Y will vary depending on the outcome of the experiment, it is called a random variable.
Each point in the sample space will be assigned a real number denoting the value of Y.
Define an experiment as tossing two coins and observing the results.
Let Y equal the number of heads obtained.
Identify the sample points in S.
Assign a value of Y to each sample point
Identify the sample points associated with each value of the random variable Y.
Compute the probabilities for each value of Y.
Population: collection of all elements of interest.
Sample: subset of the population.
The method of sampling will affect the probability of a particular sample outcome.
Simple random sample.
Stratified random sample.
Cluster sample.
Systematic sample.
Sampling with replacement: elements can be chosen more than once for inclusion in a sample.
Sampling without replacement: elements cannot be chosen more than once for inclusion in a sample.
Random sample: each of the {N \choose n} possible samples have equal probability of being selected.
N is the population size
n is the sample size
If we need to randomize, we will use a random number generator to assign a random number, then reorder the dataset and take the first n observations.