Question: programming in Java! what should I write next??? You have been asked to consider a random variable X that has 4 possible outcomes. Those outcomes

programming in Java! what should I write next???

You have been asked to consider a random variable X that has 4 possible outcomes. Those outcomes areX = {1, 2, 3, 4}

  1. Add code that prompts the user for the probability associated with each of the 4 outcomes (e.g. P (X =x)) and reads the values into the variables provided.

  2. Determine whether each individual probability given by the user in (a) is valid. For each invalid P (x), print P(x) must be between 0 and 1 on a newline.

  3. Determine if the 4 values entered collectively satisfy the requirements of a probability distribution. If they do not, print The sum of the individual outcome probabilities must sum to 1 on a newline.programming in Java! what should I write next??? You have been asked

CH3_Q1.java x package studentwork; import java.util.Scanner; Ovo u AWN public class H3_Q1 { public static void main(String[] args) Scanner scnr = new Scanner(System.in); 1 //variables storing 4 outcomes entered by user double outcome1; double outcome2; double outcome3; double outcome4; 14 15 16 17 19 20 21

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 Databases Questions!