homework01 - X(1 X(2 X n of a sequence of random...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Probability for Engineering Applications Assignment #1, due at the beginning of class on Thursday, January 26 th , 2006 1. (3 pts) Write a program using the C programming language to generate 1000 random integers in the range 0 to 8191. Use the following recursive formula to generate the numbers: X ( i ) = αX ( i - 1)mod M i = 1 , 2 , · · · , 1000 where M = 8191. Use the following two values for α : 128 and 126. You can choose any positive integer as X (0). What is the qualitative diFerence in their outputs? (Note that you have to use C or C++ and no other language or platform/package is allowed). You have to submit the program also (a printout of the program is su±cient). 2. (4 pts) (Textbook exercise 1.7) the sample mean of a series of numerical outcomes
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: X (1) , X (2) , · · · , X ( n ) of a sequence of random experiments is de²ned by h X i n = 1 n n X j =1 X ( j ) Show that the sample mean follows the following recursion formula: h X i n = h X i n-1 + X ( n )- h X i n-1 n , h X i = 0 3. (3 pts) Use the last expression in Question 2 to calculate the sample mean of the 1000 pseudo random numbers generated in Question for both α = 128 and α = 126. Plot h X i versus n and determine if the sample mean is converging to any particular value as the number of samples increases or if there is any other trend in the curves. 1...
View Full Document

This note was uploaded on 09/07/2009 for the course ECE 302 taught by Professor Gelfand during the Fall '08 term at Purdue.

Ask a homework question - tutors are online