Midterm 1 Flashcards
(21 cards)
Experiment
Some action with distinct outcomes
ex) tossing a coin is an experiment
Sample Space
Set of all possible outcomes of an experiment. Sample space can be finite, countably infinite, uncountably infinite
ex)if tossing a coin is an experiment, then the sample space of 2 toss is {HH, HT, TH, TT}
Non-determinism
We know the sample space but for a specific experiment we do not know what will be the outcome.
ex) when we measure the protein level in the blood, we know the range within which the measured value could lie but we do not know what will be specific value for a given blood sample.
Event
A subset of the sample space, could be one outcome or a set of outcomes.
ex) Tossing the coin twice is the experiment. The sample space is {HH, HT, TH, TT}. The event that the 1st toss results in heads is {HH, HT}
Finite Sample Space
sample space contains a finite number of element
ex) tossing a coin is a finite sample space because it has only two sample points. But the sample space for the experiment where the coin is tossed until a heads shows up is not a finite sample space because it is possible that you could keep tossing the coin indefinitely.
Countably Infinite Sample Space
There’s a 1-1 correspondance with natural numbers or integers. The natural numbers, integers, and rational numbers are all countably infinite.
ex) a bag with infinitely many apples would be a countable infinity because (given an infinite amount of time) you can label the apples 1, 2, 3, etc.
ex) interested in the number of tumbles before the coin hits the ground, then the sample
space is the set of all natural numbers.
Uncountably Infinite Sample Space
an infinite set that cannot have its elements put into one-to-one correspondence with the set of integers.
ex) set of real numbers
ex) interested in the speed with which the coin strikes ground, then the set of positive real
numbers forms the sample space.
Naïve Definition Of Probability and its limitations
If 𝐴 is an event, then
𝑃(𝐴)= Number of outcomes favorable to event A / Total number of outcomes
limitations:
The naïve definition of probability is only applicable for
- finite sample space
- equally likely outcomes.
Pigeon-hole principle
if n items are put into m containers, with n > m, then at least one container must contain more than one item.
Frequentist view of probability
The probability P of an uncertain event A, written P(A), is defined by the frequency of that event based on previous observations.
ex) 50.9% of all babies born are girls; suppose then that we are interested in the event A: ‘a randomly selected baby is a girl’. According to the frequentist approach P(A)=0.509.
Bayesian view of probability
You can assign probability to events that don’t repeat
ex) left the door open. What is the probability that my house gets robbed?
Sample function
This function takes a sample of the specified size from the elements using either with or without replacement and returns a vector.
sample(x, size, replace = FALSE, prob = NULL)
n = elements from which to choose size = number of items to choose replace = should sampling be with replacement?
sample function code
x = sample(1:365,10, replace=F)
print(x)
[1] 363 112 256 156 283 130 218 302 52 110
Replace Function
replace = FALSE means we do not replace anything replace = TRUE means consider we have a box with paper labeled 1 and 2. We pick one of them and then replace it back for the next experiment so we have 2 choices to choose from again.
set.seed
gives us the same set of random numbers every time we execute our code.
unique function
returns data with duplicate elements/rows removed.
Multiplication Rule
When we calculate probabilities involving one event AND another event occurring, we multiply their probabilities.
when do you use binomial coefficients vs. multinomial coefficients?
we use binomial coefficients when we have two categories
ex) heads and tails
Distinct Objects
We can tell them apart
ex) A,B,C would have the permutations:
ABC, BAC, CAB, CBA = 3!
what does “order does not matter” mean?
Different permutations of the same 𝑘 objects are not considered to be different outcomes.
ex) ABC, ACB, BAC, BCA, CAB, CBA are considered to be the same
how do you arrange k distinguishable objects
k!