Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 : 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 : Working with the Normal Distribution
Leaving the previous inputs and outputs for the previous part, add additional inputs to accept the parameters mumean and sigmastandard 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
meanval, onestd twostd
at which the normal PDF is at its mean, one standard deviation away, and two standard deviations away
Part : Application of Probability Distributions
Finally, update your function to take two further normal distribution parameters, mumean and sigmastandard 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started