Question: (a) P(II) = It helps to work it out with a pencil first: P(1) = 13 hearts 52 cards How do we get 13/52 in

 (a) P(II) = It helps to work it out with a

(a) P(II) = It helps to work it out with a pencil first: P(1) = 13 hearts 52 cards How do we get 13/52 in R? To get the 13 use dim (H) [1] or nrow (H) . We already have event 1/ from above, so this one is easier . On some you have to extract a new subset before counting the rows. To get the 52 use dim(deck52) [1] or nrow (deck52). Then divide 13/52 to get the answer .25. (b) P(F) = (c) P(ODD) = (d) P(EVEN) = This is one minus previous answer, but don't solve it that way. Extract the rows where value is even, count them, and divide by 52. (e) P(ODD) = Same as previous problem, but solve it explicitly: extract the rows that are NOT odd, count, divide. ([) P(D) = (g) P(DOR) = Intersection means AND which is & in R. (h) P(D| R) = (i) P(D UR) = Union means OR which is | in R. Note that this is unrelated to the | used in conditional probability. () P(F|EVEN) = 5. (15 points) Package your results for part 4 in a 10x3 data.frame called myprobs. Run data. frame (question = '4(a)', probability = 'P(H)', answer = .25) to see the first row as an example. Attach new rows with rbind (). When the data. frame is complete, run myprobs to display it. Don't use View (). A-level instructions: Repeat parts 3 and 4 using sqldf () for subsetting and count- ing. Reuse your code from the previous step to package and display these new results in a data.frame called myprobsA. (15 points) 4 investors This is a story about two investors. They live in Alphaville, a small town with exactly one golf course and one Starbucks. They are strangers. 7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!