Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

On-line Class Assignment No1. These problems are eligible for all students since

ID: 3846211 • Letter: O

Question

On-line Class Assignment No1. These problems are eligible for all students since we did not formed ABC groups. Solve up to THREE of these problems you will receive 5 points for each completely solved problem. Type solutions and submit them in PDF format into the Assignment Dropbox. Problem 1.(5pts) An experiment consists of tossing two fair dice. The outcome is the higher score out of the two. For example if the first die ends up 3 and the other one 6, then the outcome is 6. (a) Find the Sample space, i.e., the set of all possible outcomes. (b) Find the PDF corresponding to this experiment. (c) Find the probability of getting an even number. Is the probability of getting even equal probability of getting odd outcome? Problem 2. (5pts) A Bernoulli experiment consist of picking a random ball from the urn which contains 20 red balls and 80 blue balls. We repeat the experiment three times. The outcome after three pickings is the number of the red balls. Describe the PDF. (Write down the table) Problem 3.(5pts) Two fair dice are tossed 24 times. Should you gamble that it would contain at least one double-six? Problem 4. (5pts) In Bernoulli experiment the chances of picking red ball is 3.2 times higher than to pick a blue ball. What is the probability of picking the red ball?

Explanation / Answer

package sample;

import java.util.Random;

public class Dice {
  
   //part A
   public int twoPairDice()
   {
       Random r = new Random();
      
       int first = r.nextInt(6) + 1;
       int second = r.nextInt(6) + 1;
      
       System.out.println("First dice value: "+first +" and second dice value: "+second);
      
       return (first > second) ? first : second;
   }
  
   public void allPossibleOutcome()
   {
       int count =0;
       int evenMAxCount = 0;
       for(int i=1;i<=6;i++)
       {
           for(int j=1;j<=6;j++)
           {
               count++;
               System.out.println(i + " " + j);
               if(i > j)
               {
                   if(i % 2 ==0)
                       evenMAxCount++;
               }
               else if(i < j)
               {
                   if(j%2 ==0 )
                       evenMAxCount++;
               }
           }
       }
       double evenCountProbibility = evenMAxCount/count;
       double oddCountProbability = 1 - evenCountProbibility;
       System.out.println("Total possible outcome for even max is: "+ evenMAxCount);
       System.out.println("Total possible outcome is: " +count);
       System.out.println("Probability of getting even max numner: "+evenCountProbibility);
       System.out.println("So the probability of getting odd outcome: " + oddCountProbability);
      
       if(evenCountProbibility == oddCountProbability)
       {
           System.out.println("Yes the probability of getting odd and even is equal");
       }
       else
       {
           System.out.println("No, the probability of getting odd and even is not equal");
       }
   }
  
  

   public static void main(String []args)
   {
       Dice d = new Dice();
      
       System.out.println("Max of two dice: "+d.twoPairDice());
       d.allPossibleOutcome();
      
   }
}

//output:

First dice value: 3 and second dice value: 4
Max of two dice: 4
1 1
1 2
1 3
1 4
1 5
1 6
2 1
2 2
2 3
2 4
2 5
2 6
3 1
3 2
3 3
3 4
3 5
3 6
4 1
4 2
4 3
4 4
4 5
4 6
5 1
5 2
5 3
5 4
5 5
5 6
6 1
6 2
6 3
6 4
6 5
6 6
Total possible outcome for even max is: 18
Total possible outcome is: 36
Probability of getting even max numner: 0.5
So the probability of getting odd outcome: 0.5

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote