Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Week 1: Three dice are rolled.

What is the probability the same number appears Week 3:


Experiment: process where we obtain data from/process that leads to on exactly two of the three dice? Discrete random variables: when an RV can only take on a discrete
several possible outcomes Approach 1: you calculate the prob by using 1-Pr(not having two number of values, the RV is a discrete RV
Eg: rolling a dice, observing the height of a randomly selected NBS position with the same number) Let E, S, D denote the events that E= X is a discrete RV. Its probability distribution will be called a pmf of X
student same number on exactly two of the dices S=event all three numbers are f(x)=P(X=x)
Sample space: collection of all probable outcomes of an experiment same D=event all three numbers are different These three events are Cumulative distribution function (cdf) of x à F(x) = P(X<=x)
Eg: {1,2,3,4,5,6} , {120cm,200cm} mutually exclusive and define the whole sample space. Thus, Discrete uniform distribution: have multiple outcomes, each equally
Event: collection of some of the outcomes in a sample space/Any Pr(E)+Pr(S)+Pr(D)=1 . Pr(S)= 6 216 = 1 36 For D have six possible values likely
subset of a sample space for first die, five for second, and four for third. Number of ways to get Bernoulli distribution: when the experiments is a trial that has only 2
Eg: Dice shows even numberà {2,4,6} D=6*5*4=120. Pr(D)= 120 216 = 5 9 Pr( E)=1-Pr(D)-Pr(S)= 1 − 5 9 − 1 36 outcomes (success and failure)
Simple sample space: when a sample space has n outcomes and each = 5 12 = 0.4166667 Approach 2: You calculate the same prob by Binomial distribution: the experiment consists of a series of n
outcome has equal probability counting directly the number of outcomes involving two same numbers. independent Bernoulli trials
Properties of probabilities: Total outcomes in the sample space by multiplicative method is f(x) = P(X=x) = dbinom(x,n,p)
1. 0<=P(A)<=1 6*6*6=216 The number of outcomes involving two same numbers = F(x) = P (X <= x) = pbinom (x,n,p)
2. P(S) = 1 C3,2 * 6 * 5 = choose(3,2)*6*5 = 90. Thus, the prob of the question is Continuous random variable à integrate f(x)
3. P(A U B) = P(A) + P(B) if AnB = 0 90/216= 0.4166667.
R commands for random variables using normal curve
P(A) + P(A’) = 1 Suppose that 100 mathematics students are divided into five classes, 1. dnorm(x, mean, standard deviation) à pdf f(x)
P(AUB) + P(A) + P(B) – P(AnB) each containing 20 students, and that awards are to be given to 10 of 2. pnorm(q, mean, standard deviation) à cdf F(q)
these students (the 10 awards are indistinguishable). If each student is 3. qnorm(p, mean, standard deviation) à returns the value of x such
equally likely to receive an award, what is the probability that exactly that F(x) = p
Week 1 TUTORIALS two students in each class will receive awards? 4. Rnorm(n, mean, standard deviation) à draw a random sample size
S={1,2} where outcome (I,J) is said to occur if I appear 1st and j appear There are a total of 𝑐ℎ𝑜𝑜𝑠𝑒(100,10) ways of choosing ten mathematics n
2nd studentsto give the 10 awards to. There are 𝑐ℎ𝑜𝑜𝑠𝑒(20,2) ways of
S={H,T}, where H means outcome is head, T means outcome is tail choosing two students from a given class of 20 students. Therefore, Continuous uniform distribution:
there are (𝑐ℎ𝑜𝑜𝑠𝑒(20,2)) 5 ways of choosing two students from each of P(X<=x) = punif(x, a, b) à a is the min, b is the mac
the five classes. So, the final answer (𝑐ℎ𝑜𝑜𝑠𝑒(20,2)) 5/ 𝑐ℎ𝑜𝑜𝑠𝑒(100,10) ≈
Week 2: 0.0143.
Multiplication method: experiment (sample space) has n1 * n2 … nk Week 3 TUTORIAL:
outcomes This question illustrates that it is possible to get the answer to certain
Permutation method: An arrangement of n different outcomes probability problems thru different counting methods.
prod(n-k+1:n) In a lottery game, six numbers from 1 to 30 are drawn at random from a
Combination method: A combination is a unique subset based on k bin without replacement (meaning we won’t get the same number more
elements than once), and each player buys a ticket with six different numbers
choose(n,k) from 1 to 30. If all six numbers drawn match those on the player’s ticket,
Conditional Probability: P(A|B) = P(A n B) / P(B) the player wins regardless what sequence the six numbers are drawn. . The sum of the values of f(x) must be equal to 1. Since ∑ 𝑓(𝑥) = 15 𝑐 5 𝑥=1 , we
Independent events: 2 events are called independent events if their Consider the following three events: must have c= 1 /15 .
conditional probabilities are equal to their unconditional probabilities à A= {the draw contains the numbers 1,14,15,20,23 and 27}
P(A|B) = P(A) B= {one of the numbers drawn is 15} and A florist makes deliveries between 1:00 pm and 5:00 pm daily. Assume
P(B|A) = P(B) C= {the first number drawn is less than 10} delivery times follow the continuous uniform distribution (use punif in R)
there are 𝑃30,6 = 𝑝𝑟𝑜𝑑(25: 30)= 427518000 outcomes in the sample Determine the percentage of deliveries that are made after 4:00 pm.
Two events are independent when the occurrence of one does not space. Event A: there are 𝑃6,6 (=𝑝𝑟𝑜𝑑(1: 6)) permutations of this event Determine the percentage of deliveries that are made prior to 2:30 pm.
affect the probability of the occurrence of the other. (i.e., number of ways the 6 numbers can be ordered). Thus, Pr(A)= Determine the percentage of deliveries between 2:00 pm and 3:00 pm.
𝑝𝑟𝑜𝑑(1:6)/𝑝𝑟𝑜𝑑(25:30) ,𝑤ℎ𝑖𝑐ℎ 𝑖𝑠 𝑎𝑏𝑜𝑢𝑡 1.68414𝑒 − 06 (meaning (1) 1-punif(4, min, max) = 0.25
Mutually Exclusive: can't happen at the same time. 1.68414/106 ), an extremely small probability to win. Event B: (2) punif(2.5,min=1,max=5) =0.375
Pr(B)=𝑃29,5 𝑃30,6 × 6 = 𝑝𝑟𝑜𝑑(25:29)/𝑝𝑟𝑜𝑑(25:30) × 6 = 0.2 (we must (3) punif(3, min=1,max=5) – punif(2,min=1, max=5)
“*6” because “15“ can appear at any of the 6 positions) Event C:
Week 2 TUTORIALS: Pr(C)=𝑃29,5 𝑃30,6 × 9 = 𝑝𝑟𝑜𝑑(25:29/ 𝑝𝑟𝑜𝑑(25:30) × 9 = 0.3 (we must
Three different classes contain 18, 25 and 20 students, respectively, and “*9” because there are 9 possible numbers for the first number) (2)
no student is a member of more than one class. If a team is to be There are 𝐶30,6 = 𝑐ℎ𝑜𝑜𝑠𝑒(30,6) = 593775 outcomes in this sample
composed of one student from each of these three classes, in how space Event A: There is only one outcome. Pr(A)= 1 𝑐ℎ𝑜𝑜𝑠𝑒(30,6) =
many different ways can the members of the team be chosen? 1.68414𝑒 − 06 Event B: Pr(B)=1∗𝑐ℎ𝑜𝑜𝑠𝑒(29,5) 𝑐ℎ𝑜𝑜𝑠𝑒(30,6) = 0.2 (*1
By the multiplicative method, we obtain the answer as 18*25*20=9000 since only “15” must be selected)

Suppose that a club consists of 30 members and that a president and a


secretary are to be chosen form the membership. These two positions
cannot be taken by one member. How many possible ways that these
two positions can be filled?
P30,2=30*29= 870
Week 4: Properties of variance:
1. Var(X) >= 0
2. Var (aX+c) = a2Var(X)
3. Var(X1 + X2) = Var(X1) + Var(X2) if X1 and X2 are independent
4. Var(aX1 + bX2) = a2var(X1)+b2var(X2)+2abCov(X1X2)

Week 4 TUTORIALS:
Let X have the Bernoulli distribution with parameter p. That is, assume
that X is either 0 or 1 with Pr(X=1)=p. What is the expectation of X?
E(X) = 0 × (1 − p) + 1 × p = p

Suppose that a random variable X can take each of the five values
-2,0,1,3 and 4 with equal probability. What is the variance of X?
x=c(-2,0,1,3,4)
fx= c(0.2,0.2,0.2,0.2,0.2) #or, you may use fx=rep(.2,5)
Properties of expectations
EX=sum(x*fx)
1. E(a) = a
varx=sum(fx*(x-EX)^2)
2. E(aX+B) = aE(X) + b
varx 4.56
3. E(X1 + X2 +…+ Xn) = E(X1) + E(X2) + …+ E(Xn)
4. E(aX1 + bX2 + c) = aE(X1) + bE(X2) + c
5. E(X1X2) = E(X1)E(X2) if X1 and X2 are statistically independent

You might also like