Question

Prelab Exercise 1 (4) To generate random number with uniform distribution The probability density function of a uniformly distributed random variable X defined in [a,b] is shown below Some useful Matlab commands are listed below fx(x) 1 rand-to generate uniform distributed random variableX pdf-to obtain the probability density function(pdf cdf-to obtain the cumulative distribution function(cdf hist -- to plot the histogram of sample data a To generate sample values with uniform distribution in the range of a= -3 and b=7 % uniformly distributed random number a=-3;b=7; % range of x [-3 7] x=a+b-a*rand1,1e4; % x with uniform distribution pdfy=pdf'unif',x,a,b); % pdf cdfz=cdf'unif',x,a,b); % cdf figure(l); subplot3ll);hist(x,a:0.2:b);ylabel('Occurrence'); axis[a-1 b+1 0 300]; grid; subplot(3l2); plot(x,pdfy); ylabel('pdf of X'); axis([a-l b+l 0 0.2]); grid; subplot(3l3); plot(x,cdfz); ylabel('cdf of X'); axis([a-l b+1 0 l.2]); grid; xlabel('variable x'); (a) (2) Use the histogram (311) to estimate the pdf. Occurrence for each container (approx.) = Probability for each container (approx.) = Width of each container = = ypd (b) (2) Write down the mathematical expression of the cdf. 1

          Prelab Exercise 1
(4)
To generate random number with uniform distribution The probability density function of a uniformly distributed random variable X defined in [a,b] is shown below
Some useful Matlab commands are listed below
fx(x)
1
rand-to generate uniform distributed random variableX
pdf-to obtain the probability density function(pdf cdf-to obtain the cumulative distribution function(cdf hist -- to plot the histogram of sample data
a
To generate sample values with uniform distribution in the range of a= -3 and b=7
% uniformly distributed random number a=-3;b=7; % range of x [-3 7] x=a+b-a*rand1,1e4; % x with uniform distribution pdfy=pdf'unif',x,a,b); % pdf cdfz=cdf'unif',x,a,b); % cdf
figure(l); subplot3ll);hist(x,a:0.2:b);ylabel('Occurrence'); axis[a-1 b+1 0 300]; grid; subplot(3l2); plot(x,pdfy); ylabel('pdf of X'); axis([a-l b+l 0 0.2]); grid; subplot(3l3); plot(x,cdfz); ylabel('cdf of X'); axis([a-l b+1 0 l.2]); grid; xlabel('variable x');
(a) (2) Use the histogram (311) to estimate the pdf.
Occurrence for each container (approx.) =
Probability for each container (approx.) =
Width of each container =
= ypd
(b) (2) Write down the mathematical expression of the cdf.
1
        
Show more…
prelab exercise 1 4 to generate random number with uniform distribution the probability density function of a uniformly distributed random variable x defined in ab is shown below some useful 99846

Added by James R.

Close

University Physics with Modern Physics
University Physics with Modern Physics
Hugh D. Young 14th Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
Prelab Exercise 1 (4) To generate random number with uniform distribution The probability density function of a uniformly distributed random variable X defined in [a,b] is shown below Some useful Matlab commands are listed below fx(x) 1 rand-to generate uniform distributed random variableX pdf-to obtain the probability density function(pdf cdf-to obtain the cumulative distribution function(cdf hist -- to plot the histogram of sample data a To generate sample values with uniform distribution in the range of a= -3 and b=7 % uniformly distributed random number a=-3;b=7; % range of x [-3 7] x=a+b-a*rand1,1e4; % x with uniform distribution pdfy=pdf'unif',x,a,b); % pdf cdfz=cdf'unif',x,a,b); % cdf figure(l); subplot3ll);hist(x,a:0.2:b);ylabel('Occurrence'); axis[a-1 b+1 0 300]; grid; subplot(3l2); plot(x,pdfy); ylabel('pdf of X'); axis([a-l b+l 0 0.2]); grid; subplot(3l3); plot(x,cdfz); ylabel('cdf of X'); axis([a-l b+1 0 l.2]); grid; xlabel('variable x'); (a) (2) Use the histogram (311) to estimate the pdf. Occurrence for each container (approx.) = Probability for each container (approx.) = Width of each container = = ypd (b) (2) Write down the mathematical expression of the cdf. 1
Close icon
Play audio
Feedback
Powered by NumerAI
Ivan Kochetkov David Collins
Kathleen Carty verified

Sri K and 66 other subject Physics 102 Electricity and Magnetism educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
in-modeling-and-simulation-one-often-has-pdf-fx-and-corresponding-cdf-fx-from-which-one-would-iike-to-make-random-draws-show-that-if-one-draws-uniformly-yuo1-from-fx-then-one-has-xp-which-is-94835

In modeling and simulation, one often has a PDF f(x) and corresponding CDF F(x) from which one would like to make random draws. Show that if one draws uniformly y~U(0,1) from F(x), then one has x=F⁻¹(y) which is a random draw from f(x). The derivation is simple and you can look to the internet for a solution. As an example, consider the exponential density f(x)=ιe⁻ˡᶰ. It has a density that for λ=5 looks like It's CDF and an example of a random draw is shown below: Instructions Draw 1000 samples form a uniform distribution over [0,1]. Use these to perform random draws from the exponential distribution above. Plot a histogram of these 1000 draws using the MATLAB "hist.m" function. Also plot the original random draws, e.g., plot(x).

Sri K.

in-modeling-and-simulation-one-often-has-pdf-fx-and-corresponding-cdf-fx-from-which-one-would-iike-to-make-random-draws-show-that-if-one-draws-uniformly-yuo1-from-fx-then-one-has-xp-which-is-93303

In modeling and simulation, one often has a PDF f(x) and corresponding CDF F(x) from which one would like to make random draws. Show that if one draws uniformly y~U(0,1) from F(x), then one has x=F⁻¹(y) which is a random draw from f(x). The derivation is simple and you can look to the internet for a solution. As an example, consider the exponential density f(x)=λe⁻ᵁˣ. It has a density that for λ=5 looks like It's CDF and an example of a random draw is shown below: Instructions Draw 1000 samples form a uniform distribution over [0,1]. Use these to perform random draws from the exponential distribution above. Plot a histogram of these 1000 draws using the MATLAB "hist.m" function. Also plot the original random draws, e.g., plot(x).

Sri K.

in-modeling-and-simulation-one-often-has-pdf-fx-and-corresponding-cdf-fx-from-which-one-would-iike-to-make-random-draws-show-that-if-one-draws-uniformly-yuo1-from-fx-then-one-has-xp-which-is-94835

In modeling and simulation, one often has a PDF f(x) and corresponding CDF F(x) from which one would like to make random draws. Show that if one draws uniformly y~U(0,1) from F(x), then one has x=F⁻¹(y) which is a random draw from f(x). The derivation is simple and you can look to the internet for a solution. As an example, consider the exponential density f(x)=ιe⁻ˡᶰ. It has a density that for λ=5 looks like It's CDF and an example of a random draw is shown below: Instructions Draw 1000 samples form a uniform distribution over [0,1]. Use these to perform random draws from the exponential distribution above. Plot a histogram of these 1000 draws using the MATLAB "hist.m" function. Also plot the original random draws, e.g., plot(x).

Sri K.


*

Recommended Textbooks

-
University Physics with Modern Physics

University Physics with Modern Physics

Hugh D. Young 14th Edition
achievement 1,035 solutions
Physics: Principles with Applications

Physics: Principles with Applications

Douglas C. Giancoli 7th Edition
achievement 1,713 solutions
Fundamentals of Physics

Fundamentals of Physics

David Halliday, Robert Resnick , Jearl Walker 10th Edition
achievement 1,538 solutions

*

Transcript

-
00:01 Let's discuss the following questions so here we will get the x value that is equals to 0 5 15 and p1 value that is expcdf x comma 5...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever