Question: R code help Problem 2 Counting a nasty event Based on the setup from problem 1 describe in words the compound event. ind2
R code help
Problem 2 Counting a nasty event
Based on the setup from problem 1 describe in words the compound event.
ind2<- abs(sampleSpace$die1 -sampleSpace$die2) <=2 & abs(sampleSpace$die2 -sampleSpace$die3) <=2 Call this event A. By counting elements in A using sampleSpace and ind2 what is P(A)?
Problem 1 setup
sampleSpace<-expand.grid(die1= 1:6, die2= 1:6, die3 = 1:6) lengths(sampleSpace) nrow(sampleSpace) typeof(sampleSpace) ind<-sampleSpace$die1 == 4 ind typeof(ind) sampleSpace[ind, ] lengths(sampleSpace[ind, ])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
