Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can some one help me with this 2 matlab problem i got stuck thank you asap... 1. Write a MATLAB function binomialPMF that takes as

image text in transcribed

can some one help me with this 2 matlab problem i got stuck thank you asap...

1. Write a MATLAB function binomialPMF that takes as input the scalar quantities n and p and returns a vector containing the binomial distribution with parameters n and p, i.e. x(k) = (O)pk(1-p)"-k, k = 0.1, , n Create a single figure containing the following three binomial distributions: (a) n-40 and p = 0.5 plotted as a solid red line with legend description "n=40 and p=0.5". (b) n-40 and p = 0.8 as a solid green line with legend description "n=40 and p=0.8", and (c) n = 80 and p 0.5 as a solid blue line with legend description "n=80 and p-05', Label the x-axis with "k", y-axis with "p X(k)", and use the title "Binomial Probability Mass Function 2. Write a MATLAB function geometricPMF that takes as input a value kmax and a scalar quantity p and returns a vector containing the values of a geometric distribution (truncated at kmax) with parameter p, i.e., px(k)= (1-p)k-ip, k = 1, 2, , kmaz Using kmax - 50, create a single figure containing the following three geometric distributions (a) p - 0.3 plotted as a solid red line with legend description "p-0.3"; (b) p = 0.5 as a solid green line with legend description "p=0.5", and (c) p = 0.8 as a solid blue line with legend description "p=0.8" Label the x-axis with "k", y-axis with "p.X(k)", and use the title "Geometric Probability Mass Function

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

More Books

Students also viewed these Databases questions

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago

Question

1. Identify the sources for this conflict.

Answered: 1 week ago