document.write( "Question 1199262: 1. In Angel’s Garden, there is a 3% chance that a tomato will be bad. Angel harvests 100
\n" ); document.write( "tomatoes and wants to know the probability that at most five tomatoes are bad.\r
\n" ); document.write( "\n" ); document.write( "2. Consider a rather nonstandard dice. Instead of the numbers 1 through 6, die A has two 3’s,
\n" ); document.write( "two 5’s, and two 7’s; die B has two2’s, two 4’s, and two 9’s; and die C has two 1’s, two 6’s,
\n" ); document.write( "and two 8’s, as in the figure below
\n" ); document.write( "Suppose dice A and B are rolled. If A is more likely to get the higher number. That is, P(A >
\n" ); document.write( "B) > 0.50, where {A > B} denotes the event that A beats B. Hint: Condition on the outcome of
\n" ); document.write( "die A.
\n" ); document.write( "Now, if B and C are rolled, B is more likely to get the higher number. And, remarkably, if C
\n" ); document.write( "and A are rolled, C is more likely to get the higher number. These dice are known as nontransitive dice and are the basis of a magic trick. You pick any die. Then anyone can always
\n" ); document.write( "pick a die that is more likely to beat yours. If you pick A, he picks C. If you pick B, he picks
\n" ); document.write( "A. And if you pick C, he picks B. Your task is to write an R code that will simulate this nontransitive dice elaborated above.
\n" ); document.write( "HINT: Define three functions that will represent the three dices as samples representing the
\n" ); document.write( "three configurations given in the figure above (A, B and C), then replicate the experiment
\n" ); document.write( "several times (100, or 1000 times) by calling the functions with the conditions given above.\r
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #833060 by ikleyn(52781)\"\" \"About 
You can put this solution on YOUR website!
.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Thank you for posting us the description of this curious phenomenon.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "But it this forum we do not write computer codes in response to the visitors requests.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "It is NEITHER a profile NOR a focus NOR a goal and NOR a subject of this forum.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "                To learn what is the subject of this forum,
\n" ); document.write( "                    read attentively from the front page.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "So, it was your mistake to post this request to this forum.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Try to find another web-site / forum for your request.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "//////////////////\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "                    In the future,  \"highlight%28highlight%28NEVER%29%29\"  pack more than one problem per post - - - \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "        - - - if you are not an enemy to yourself  (which I assume,  by default) \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "        - - - and if you want your requests be considered seriously  (which I also assume,  by default).\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );