The four screensout is the question and plz follow the format of template
1. In this question, you will use simulation to estimate the value of z based on the fact that the area of circle with radius 1 is z.
a. Set the seed of the random number generator to 1234
b. Generate Xl, ,Xn, Yl,.
, Yn as i.i.d. random variables from l), where n 100. Don't display these 200
random variables in your solution.
c. Regard (Xi, Yi) as an coordinate in the xy plane. Find out the number of pairs (Xi, Yi)'s that fall within a circle centered at (O, O)
with radius 1 .
d. Compute the proportion p of pairs that fall within the circle. According to law of large numbers, 4p "converges" to z, when as n goes
to infinity. Compute the absolute error between 4p and z.
e. Set the seed to 5678 , and repeat part (b)-(d) with n 10000.
In the following questions, you will debug each of the functions included in the corresponding questions so that they produce the correct results.
After correcting those problems, you need to show the debugged function and display the result Of the testing code based on your debugged
function. Also you have to explain in words what changes you made and why. For convenience, the functions and testing code are also provided
in an accompanying R file.
2. my.dgamma. log() generates the log of the probability density of the Gamma distribution. Use ?lgamma to understand what it does. Note
that this is exactly equal to the function dgamma( ... ,
log-TRUE) so use this to verify your answers.
The function to be debugged:
my.dgamma. log C— function( xx, shape,
shape* log ( rate)
— Igarnma(shape) + (shape—I) —
The testing code:
rate)
rate*xx
my. dgamma. 2, 5, rate—5)
dgamma( 2, 5, . 2), 2, log—TRUE)
my.dgamma. log (seg(0.4, 10, by—O.4), shape—O . 2, rate—5)
my.dgamma. log (seq(l, 10, by—O.2), shape—2, rate:6)
3. my. dnorm. log() generates the log of the probability density of the normal distribution. Note that this is exactly equal to the function
. , log—TRUE) so use this to verify your answers.
dnorm(
The function to be debugged:
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