ECE 3800 Fall 2007

Computer Assignment 1


Part I: Theory: If  X is a uniform random variable between 0 and 1, and , show that the density of  Y is triangular,  fY(y) = 2y , for 0  <  y  <  1. (Use the method of Sec 3.4). Make a graph of fY(y).


Part II : Experimental: Generate a random variable with triangular density

1)      Generate 100 uniform random numbers between 0 and 1 for X.

2)      Apply the transformation as above to get 100 values of Y.

3)      Plot a histogram of Y values. Divide into 10 bins.

4)      You can use the MATLAB code of text Sec. 3.5 as a model.


Part III: Report : Submit your work in lab report form: Include sections on : Objective, Procedure, Data, Conclusion. Discuss relation of your work in  Parts I and II in the  Conclusion section.

Part IV: Supplemental: (resubmission due Mon 10/22)

Purpose : The purpose of the supplemental is to demonstrate you have learned the MATLAB  code you used., and can explain how it relates to project objectives. Your prior submission mainly described details of what you did. The resubmission should explain why you did it, with relation to project objectives.

Given: Project objectives : (1) Generation of uniformly distributed random numbers  (2) Transformation into triangularly distributed random numbers (3) Verification of triangular density by histogram. (4) Verification of  uniform density by histogram.

Procedure:   You should prepare a commented listing of the MATLAB code. Each MATLAB statement has the form : Result = function(parameter1, parameter2, …etc.). Your comment statements should address (1) How parameter values relate to project objectives (2) What is the expected result (3) How expected result relates to project objectives. You can use MATLAB help feature to learn about the specific functions used.  (If you used EXCEL you should provide similar details for EXCEL functions used)

Your comments should be your own plain English explanations. Avoid plagiarism. Avoid simply duplicating the MATLAB keywords.