Notes about your assignment: You should use R to answer each of these questions. In your R script please label the questions in order using comments (as well as any sub-parts), and include the answer to each question (typically, what you get when you run your code) as comments at the end of each question.
1. If x0 = 5 and
find x1, ..., x10
2. If x0 = 3 and
xn = 3xn−1 mod 150
find x1, ..., x10
xn = (5xn−1 + 7) mod 200
For questions 3-9, use Monte Carlo integration to approximate the given integrals. If you are able to calculate the integral analytically, you may want to use this to double-check your work!
3. ∫ 1 eex dx
4. ∫ 1(1 − 2 3
0
5. 2
−2
x ) 2 dx ex+x2 dx
6. ∫ ∞ x(1 + x2)−2dx
7. ∞ ex2 dx
−∞
[Hint: symmetry is your friend!]
8. ∫ 1 ∫ 1 e(x+y)2 dydx
9. ∫ ∞ ∫ x e−(x+y)dydx
[Hint: Let IY
(x) = 1 y < x . Use this function to equate the integral to one in which both terms go
0 y ≥ x from 0 to ∞]
10. Use simulation to approximate Cov(U, eU ) where U is uniform on (0, 1).
11. Let U be uniform on (0, 1). Use simulation to approximate the following:
a) Cov(U, √1 − U 2)
b) Cov(U 2, √1 − U 2)
12. For uniform (0, 1) random variables U1, U2, ... define N to be the number of random numbers that must be summed to exceed 1:
N = Minimum{n : Σn Ui > 1}
a) Estimate E{N} by generating 100 values of N
b) Estimate E{N} by generating 1,000 values of N
c) Estimate E{N} by generating 10,000 values of N
d) Can you guess the true value of E{N}?
13. For uniform (0, 1) random variables, define N to be the maximum number of random numbers whose product is still at least e−3:
N = Maximum{n : Qn Ui ≥ e−3}
a) Find E{N} by simulation
b) Find P (N = i) for i = 0, 1, 2, 3, 4, 5, 6 by simulation
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme