Question: SOLVE IN RSTUDIO Question 2 . a - What is the height of the triangle at its peak, such that it is a valid probability

SOLVE IN RSTUDIO
Question 2.a - What is the height of the triangle at its peak, such that it is a valid probability distribution? Save your answer in the variable height
Question 2.b - Create a function area_to_the_left, which takes a single variable (x1) and calculates the area to the left, returning a value between 0 and 1. The basic setup of the function is defined in the provided code. Note that you will need to use a slightly different equation if x1 is less than or greater than 3.
Question 2.c - Create a function area_to_the_right, which takes a single variable (x1) and calculates the area to the right, returning a value between 0 and 1. The skeleton of the function is defined in the provided code. You can attempt to copy the setup used in the previous function, but students may find it easier to utilize area_to_the_left() already defined.
Question 2.d - Create a function area_between, which takes two numeric variables (x1 and x2) and calculates the area between them, returning a value between 0 and 1. You can assume that x1 x2. The skeleton of the function is defined in the code, and again students
may find it easiest to utilize the previously defined functions area_to_the_left() and/or area_to_the_right().
Question 2.e - If we generate a random number utilizing this distribution, what is the probability that we get a number less than 1 or greater than 4 Save your answer in the variable q2.e
Question 2.f - If we generate a random number utilizing this distribution, what is the probability that we get a number between 2.5 and 3.75? Save your answer in the variable q2.f
Question 2.g - If we generate a random number utilizing this distribution, but we discard any value greater than 4, what is the probability that we get a value greater than 1.5? Save your answer in the variable q2.g
Question 2.h - If we generate two random numbers utilizing this distribution, what is the probability that one of the numbers is greater than 2.5, and one is less than 2.5? Save your answer in the variable q2.h
SOLVE IN RSTUDIO Question 2 . a - What is the

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