Question

This is a programming assignment. You can use any programming language you like You have to submit your computer codes along with the homework. 1. We will now have a look at computer simulations of continuous random variables. (a) Let X be a continuous random variable that is uniformly distributed on 0, 1]. I am sure every one of you can determine actual PDF of X. For warmup, we will try to approximate it using numerical data. For this purpose, we can imagine that the rand function in Octave/Matlab/C returns one realization of X As in the previous homework, we call rand n times to get n values, say (1) 0.134, 0.456, 0.1938944, 0.3928, 0.878, etc. Well, unlike the discrete case, you cannot, for example, take 0.134, and try to count the number of its occurrences in the seguence you generated. as 0.134 will likely happen only once in the entire sequence. This agrees with the fact that P(X a) 0 for any a, when X is a continuous random variable. So, how will you approximate the PDF? The idea is to use a variant of the observation in Page 1 of the book, i.e fx (z) (2) r for small o. So, we can pick some small 5, and consider the intervals (3) for some random variable that we know is distributed on 0,1]. According to (2), we have P (X E 0, 6]) (4) POX E 5, 26]) (5) fx (6) fx and so on. Now, in order to calculate fx I need P(x E D0,81). This I can estimate from the sequence of n numbers I generated. Specifically, POXE 10, would approximately be the number of samples that lie in the interval [0, over the total number of samples, n. In this manner, you can approximate all the terms fx fx (S 5) fx (1- Joining the points (7)Please answer these questions and please show your code this assignment is all correlated so feel free to use whatever program you'd like. Thank you very much.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Objective-C is the primary programming language you use when writing software for OS X and iOS. It’s a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime. Objective-C inherits the syntax, primitive types, and flow control statements of C and adds syntax for defining classes and methods. It also adds language-level support for object graph management and object literals while providing dynamic typing and binding, deferring many responsibilities until runtime.

Add a comment
Know the answer?
Add Answer to:
Please answer these questions and please show your code this assignment is all correlated so feel...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • info here is given to help solve #3 below this photo: You may use any computer...

    info here is given to help solve #3 below this photo: You may use any computer software of your choice to complete this assignment Random variables from the four probability distributions given may be generated as follows 1. A standard uniform random variable, U in the interval (0,1), i.e., U ~ U (0,1), may be generated using the Matlab function 'rand'. The corresponding uniform random variable, X in the interval (-1,1) may be obtained as X 2U 1 2. A...

  • Problem # 8. a) Let X be a continuous random variable with known CDF FX(x). LetY = g(X) where g(·) is the so-called sign...

    Problem # 8. a) Let X be a continuous random variable with known CDF FX(x). LetY = g(X) where g(·) is the so-called signum function, which extracts the sign of its argument. In other words, g(X) = { -1 x<0, 0 x=0, 1 x>0 } Express the PDF fY (y) in terms of the known CDF FX(x). b) Let X be a random variable with PDF: fX(x) = { x/2 0 <= x < 2, 0 otherwise} Let Y be...

  • Show all work! Thank you! Sk(x+y) 0<x<1, 0<y</ 14. Determine k, so that fx.y(x, y)= otherwise...

    Show all work! Thank you! Sk(x+y) 0<x<1, 0<y</ 14. Determine k, so that fx.y(x, y)= otherwise is a joint pdf. 10 15. Determine k, so that fxy(x,y)= kry 0<x<1, 0<y<1. 6 otherwise is a joint pdf. k(xy?) 0<x<1, 0<y<1. is a joint pdf. Determine k, so that fx.x(x,y)= 1 otherwise 17. Determine k, so that fx.y(x,y)= kr 0<x<y<1 O otherwise is a joint pdf. k(x + y) 0<x< y<1 18. Determine k, so that fx. (x,y)= 1 0 otherwise is...

  • please show all work Consider the piece-wise continuous function k(x) as defined below: (Vx+1 k(x) =...

    please show all work Consider the piece-wise continuous function k(x) as defined below: (Vx+1 k(x) = -* 10 -1<x< 0 0<x51 otherwise a) Find a valid PDF for random variable X, fx(x), that can be derived from k(x), then plot this PDF b) Find and plot the CDF for the random variable X, Fx(x) c) Find the expected value of X, E(X)

  • please answer all parts for the first questions and only the last part for the second...

    please answer all parts for the first questions and only the last part for the second one. I posted the second one already but the the last part was incorrect. thank you for the help. 16. 0/0.35 points Previous Answers DevoreStat9 5.E.009. My Noteso Ask Your Teacher Each front tire on a particular type of vehicle is supposed to be filled to a pressure of 26 psi. Suppose the actual air pressure in each tire is a random variable-X for...

  • 5000) of uniformly distributed random numbers between 1 Generate a large number (1000 or and 2...

    5000) of uniformly distributed random numbers between 1 Generate a large number (1000 or and 2 (HINT: use the rand command for generating a uniformly distributed random variable between 0 and 1 and then move it!). b Plot the pdf of the distribution. Use the hist command to obtain the number of samples in a random numbers, define binx as a vector with bins on the x-axis (binx = 1:0.01:2). P histx,binx) will provide you the weights pdf. Compare with...

  • 4. 3/6 points Previous Answers ASWSBE13 6.2.004. My Notes Ask Your Teacher Most computer languages include...

    4. 3/6 points Previous Answers ASWSBE13 6.2.004. My Notes Ask Your Teacher Most computer languages include a function that can be used to generate random numbers. In Excel, the RAND function can be used to generate random numbers between 0 and 1. If we let x denote a random number generated using RAND, then x is a continuous random variable with the following probability density function. ROX) i for 0 SX S1 10 elsewhere (a) Graph the probability density function....

  • P7 continuous random variable X has the probability density function fx(x) = 2/9 if P.5 The...

    P7 continuous random variable X has the probability density function fx(x) = 2/9 if P.5 The absolutely continuous random 0<r<3 and 0 elsewhere). Let (1 - if 0<x< 1, g(x) = (- 1)3 if 1<x<3, elsewhere. Calculate the pdf of Y = 9(X). P. 6 The absolutely continuous random variables X and Y have the joint probability density function fx.ya, y) = 1/(x?y?) if x > 1,y > 1 (and 0 elsewhere). Calculate the joint pdf of U = XY...

  • I am not familiar with this kind of questions. Please help me solve this. Your work...

    I am not familiar with this kind of questions. Please help me solve this. Your work will be greatly appreciated. THX !! 6. (20 points) Let X be a continuous random variable such that, P(X <0) equals zero and for each 0, the cumulative density function Fx) is differentiable and its derivative equals the probability density function fx (a) (6 points) Given 0 < b< a, find an expression of the probability P(b X a) in terms of the function...

  • PLEASE ANSWER ALL QUESTION 1 1 points Save Answer A random variable is a uniform random...

    PLEASE ANSWER ALL QUESTION 1 1 points Save Answer A random variable is a uniform random variable between 0 and 8. The probability density is 1/8, when 0<x<8 and O elsewhere. What is the probability that the random variable has a value greater than 2? QUESTION 2 1 points Save Answer The total area under a probability density curve of a continuous random variable is QUESTION 3 1 points Save Answer X is a continuous random variable with probability density...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT