Answered step by step
Verified Expert Solution
Link Copied!

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

can someone please help me with the product?

Answered: 1 week ago

Question

4 How can you create a better online image for yourself?

Answered: 1 week ago