first exam cover chapter two.
“There are three kinds of lies: lies, damned lies, and statistics.”
When we change an observation (eg.4) from Group A to Group B, both mean increased.
# Life span of two groups
Healthy=c(60,70,80,90,100)
Cancer=c(45,50,55,60,65)
mean(Healthy)
## [1] 80
mean(Cancer)
## [1] 55
By changing diagnose method or imaging techniques.
# Change the 60 to the other group
Healthy=c(70,80,90,100)
Cancer=c(45,50,55,60,60,65)
mean(Healthy)
## [1] 85
mean(Cancer)
## [1] 55.83333
Mean is sensitive to outlier and may not represent a “typical” value of the group.
Event: Pulling out an orange ball (doesn’t matter which one).
Random draw: Put my hand in the bowl and pull ball out without looking.
record the color and put them back.
Experiment: single, “random” trail
Outcomes: observable, potential result of the trial
Sample Space: Set of all outcomes.
Event: any subset of the sample space (subset of sample space)
Probability of an event: the relative frequency with which that event can be expected to occur
WE could also think of probability as being a function that takes every event and assigned between 1 and 0.
\[ P(X) \]
Subset: collection of any outcomes
Elementary event: an event consisting of a single outcome
empty set: set that does not have any element.
Complement of event of A are all the space other than event A (denoted by \(A^c\))
Multiple events
Intersection:
\[ C = A \cup B \] Mutrually exclusive event: events that don’t have any overlap (\(C = A \cup B =\phi\)) (independent from each other)
Union:
\[ C = A \cap B \]
Difference and Subset: A-B = the event have the outcomes contains A but not B
if \(A\cup B=A\),then A is a subset of B, denoted by (\(A \subseteq B\))
We may also use this notation for sum in union / intersection operations
\[ \cup^k_{i=1}A_i = A_1\cup A_2 \cup A_3 ... \cup A_k \] Union otherwise..
Union… At least one sample is acceptable
Intersect… All the sample is acceptable
Commutative Laws: \[ A\cup B=B\cup A,A\cap B=B \cap A \]
Associative Laws: \[ (A\cup B)\cup C=A\cup(B\cup C),(A\cap B)\cap C=A\cap(B\cap C) \]
Distributive Laws: \[ (A\cup B)\cap C=(A\cap C)\cup(B\cap C),(A\cap B)\cup C=(A\cup C)\cap(B\cup C) \]
De Morgan’s Laws: \[ (A\cup B)^c=A^c\cap B^c, (A\cap B)^c=A^c\cup B^c \]
We want probability to be relative frequency with which we expect the event to occur
Axiom 1: \(P(S)=1\)
Axiom 2: \(0\leq P(A) \leq 1\)
Axiom 3: \(P(A\cup B)=P(A)+P(B)\) if they are multrally exclusive.