The triangular(a, m, b) distribution has pdf as f(x)= { 2(x-a) (b-a)(m-a) 2(6-x) (b-a)(b-m) a < x

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter20: Queuing Theory
Section20.4: The M/m/1/gd/∞/∞ Queuing System And The Queuing Formula L = Λw
Problem 14P
icon
Related questions
Question

r language

The triangular(a, m, b) distribution has pdf as
f(x)=
{
2(x-a)
(b-a)(m-a)
2(6-x)
(b-a)(b-m)
a < x <m
m≤ x <b.
Write a function to generate a random sample of size n from the triangular (a, m, b) distribution by the
acceptance-rejection method. Generate a random sample of size 1000 from the triangular (0, 1/3, 1) distribu-
tion. Check the density histogram of the random sample with the density curve.
Transcribed Image Text:The triangular(a, m, b) distribution has pdf as f(x)= { 2(x-a) (b-a)(m-a) 2(6-x) (b-a)(b-m) a < x <m m≤ x <b. Write a function to generate a random sample of size n from the triangular (a, m, b) distribution by the acceptance-rejection method. Generate a random sample of size 1000 from the triangular (0, 1/3, 1) distribu- tion. Check the density histogram of the random sample with the density curve.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr