Week 5 SCM (resampling and simulation) Flashcards
what are the 4 steps to running a monte carlo simulation
Define a domain of possible values
Generate random numbers within that domain from a probability distribution
Perform a computation using the random numbers
Combine the results across many repetitions
what does randomness mean in statistics
unpredictable
what is randomness in physical processes and computer generations
only true randomness is generated by physical processess
Computer generated numbers can only give us pseudo random numbers out of a pregenerated list of many many numbers
what is bootstrapping?
a statistical procedure that resamples a single dataset to create many simulate samples
this allows us to make population based estimates such as standard errors and confidence intervals without actually knowing the population data
this rests on the assumption that under large sample sizes the sample distribution will be approximatly normal and the standard deviation of the distribution will be equal to the standard error
more resamples derives a better estimate of the sampling distribution
what is the probability of A given B
P(A|B) = P( A and B) / P(B)
whats sensitivity and specificy in screening tests
sensitivity is likelyhood of finding a disease when present = P(Positive Test| Disease)
Specificity is likelyhood to give a negative result when disease is absent = P(Disease| Positive Test)
what is bayes rule and how can we redefine it?
If we know P(A|B) but want to know P(B|A) we can use bayes rule
To use bayes rule we will also need to know the overall probability of B (known as the base rate)
Bayes rule:
P (B|A) = P(A|B) * P(B) / P(A)
Using the sum rule we can define P(A) as:
P(A) = P(A|B) * P(B) + P(A|¬B) * P(¬B)
therefore if we only have two outcomes bayes rule can also be expressed as:
P(B|A) = (P(A|B) * P(B)) / ( P(A|B) * P(B) + P(A|¬B) * P(¬B) )
what are the names for the different parts of bayes rule
Bayes rule:
P (B|A) = P(A|B) * P(B) / P(A)
PRIOR= P(B)
LIKELYHOOD= P(A|B)
MARGINAL LIKELYHOOD= P(A)
POSTERIOR= P(B|A)
How to write odds in probability notation?
odds of A = P(A) / P(¬A)
how to write the odds ratio of bayes formula
Bayes rule:
P (B|A) = P(A|B) * P(B) / P(A)
Prior odds= P(B) / P(¬B)
Posterior odds = P (B|A)
odds ratio= Posterior odds/ Prior odds
an odds ratio of x shows us that the odds of B is increased x amount given A.
what is the difference between the frequentist and the bayesian approach to statistics
FREQUENTIST APPROACH- interprets probabilities in terms of the long term frequencies after many repetitions. However this only works well for events that can be repeated many times in the same way
BAYESIAN APPROACH- reflects the degree of belief in a particular proposition
what is a vector
an entity that has both direction and a magnitude but not a fixed position
how would you notate vectors in space with coordinates
for 2D: p= xi + ij
for 3D:p= xi + yj + zk
where i j and k are vectors of length 1 along the x, y and z axes respectively
the vector can be visually represented as an arrow starting at an origin and ending at point p
how do you add vectors geometrically?
- identify the parrelogram spanned by the two vectors
- the longest diagonal line between two parrelelogram points is the equivalent of vector1 + vector2
what is a null vector?
the result of subtracting a vector from itself. this is the only vector that has zero magnitude