Run the codes names(table(rowSums(S_Die))) and table (rowSums(S_Die)) from Example 5.2.7 and verify that you have completely understood

Question:

Run the codes names(table(rowSums(S_Die))) and table (rowSums(S_Die)) from Example 5.2.7 and verify that you have completely understood the examples code. Now, roll four die and answer the probability of obtaining an odd number greater than ten.


Data from in  Example 5.2.7

Contd. For the rolling of die experiment, the probability of obtaining an odd number is

Now, how do we get the answer from the rolldie function? An integer x is odd if x %% 2 returns 1, and this logic will be exploited to get the answer for the probability of a die to return an odd number. Thus, the next small R program returns the required answer.

Frequently, we may be interested in some variations or transformations of the sample space. For example, consider the sample space arising as a consequence of rolling two dice. Here, the sample space is the collection of the couplets Ω = {(i, j)|i, j = 1, 2, … , 6}, and it has 36 points. Now, if we were to consider the sum of the numbers on both dice, the relevant sample space is Ω′ = {2, 3, … , 11, 12}. The number of elements in the modified sample space is now 11. How do we obtain such a sample space for the rolldie function? Let us work out how to answer the probability of the events in the modified sample space.

For a clearer understanding of the program here, note that the table function gives the frequency of the repeated values of a vector or a data. frame. Thus, if you first run names(table(rowSums(S_Die))) and table(rowSums(S_Die)), all doubts should be addressed. Now solve the problem related to rolldie in the exercise section to complete your understanding of the roll die experiment.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

A Course In Statistics With R

ISBN: 9781119152729

1st Edition

Authors: Prabhanjan N. Tattar, Suresh Ramaiah, B. G. Manjunath

Question Posted: