Question: Write a single MATLAB function called calcProbs which can do each of the following three tasks. Note: A single function, with appropriate inputs and outputs

Write a single MATLAB function called calcProbs which can do each of the following three tasks.
Note: A single function, with appropriate inputs and outputs as described in the questions below, is required. You should only submit your answer after you have done each of the three parts below.
Part 1: Understanding of Basic Probability Concepts
Your function should be able to take in a probability density function called pdf and an interval [a, b] and return a variable, prob, which is the probability of a random variable falling within that interval.
Note: You should not define a specific pdf, but allow the function to work for an arbitrary pdf.
Part 2: Working with the Normal Distribution
Leaving the previous inputs and outputs for the previous part, add additional inputs to accept the parameters mu1(mean) and sigma1(standard deviation) for a normal distribution. The function should plot, with x and y labels, the PDF of the distribution and update it to also return the values
mean_val, one_std, two_std
at which the normal PDF is at its mean, one standard deviation away, and two standard deviations away
Part 3: Application of Probability Distributions
Finally, update your function to take two further normal distribution parameters, mu2(mean) and sigma2(standard deviation) and output the variable area which calculates the area of overlap between the two distributions.

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!