Question

In: Statistics and Probability

what does it mean to treat a value as fixed in simulation in r ?

what does it mean to treat a value as fixed in simulation in r ?

Solutions

Expert Solution

Sometimes during coding we require to run a program based on a fixed value of a certain variable. Here, the program may or may not have other variable values or random values. But, those values are based on that fixed or unchanged value, that is to say , we compute or produce a set(or sets) of random outcomes based on that value. This fixed value is usually provided in the situation at hand. For example, we may wish to have a random sample of size 100. The R code to generate the sample would look like:

norm <- rnorm(100, 2, 5)
norm[1:10]
 

So , rnorm function generates here a random sample of size 100 with mean 2 & standard deviation 5.

## [1] -4.925 2.192 -1.815 3.062 9.128 5.722 5.501 0.853 2.985 8.036

This is a typical outcome of the aforementioned code. norm function will generate different samples every time we run the code(i.e. random sample) based on the two parameter mean and s.d. of the normal distribution which are fixed here as 2 & 5 respectively. So, 2 & 5 are fixed values of of the parameters mean & s.d here respectively.


Related Solutions

what does the following mean in R programming: %d
what does the following mean in R programming: %d
What does relevant range mean? Why are “fixed costs” considered “fixed” and how does the relevant...
What does relevant range mean? Why are “fixed costs” considered “fixed” and how does the relevant range affect a cost’s “fixed-ness?” 2. When using the high-low method, why might we be concerned about our estimates for variable cost per unit and total fixed costs? 3.   Define contribution margin. How would management use contribution margin when making decisions for the business? 4.   Are variable costs and differential costs the same thing? Why or why not?
4. What is the predictive value of positive test? What does this mean in words and what does this mean for the practical value of the test?
  Sensitivity and Specificity We are interested in looking at the connection between a test and a disease to investigate the ability of the test to distinguish between sick and healthy. We look at a sample of 50,000 people who have been tested for a particular disease. Of these, 100 have the disease. Of the 100 who have the disease, 95 are receiving positive test results. Of those who are healthy, there are 48902 people who get negative test results....
what does it mean to maximise the value of a company
what does it mean to maximise the value of a company
What does it mean to maximize the value of a corporation?
What does it mean to maximize the value of a corporation?
Q3. (This question is based in R) Now use the simulation ("X = rnorm(1000, mean =...
Q3. (This question is based in R) Now use the simulation ("X = rnorm(1000, mean = 10, sd = 2)", "Y = rnorm(1000, mean = 5, sd = 3)") to estimate the distribution of X+Y and create confidence intervals. A) Form a set of Xs and Ys by repeating the individual experiment for B = 2000 times, where each experiment has n = 1000 samples. You may want to write a for loop and create two matrices "sample_X" and "sample_Y"...
What does the population mean for your population (that is the value population mean)? What is...
What does the population mean for your population (that is the value population mean)? What is the mean of your sampling distribution of sample means (that is the value sampdistrmean)? According to the Central Limit Theorem, there is a formula relating the population means and the mean of the sampling distribution of sample means. What is that formula and how well did the outcomes of your simulation match that formula? Explain and specifically reference the formula.
How does the Kd value conpare with the Ki value? What does this mean in terms...
How does the Kd value conpare with the Ki value? What does this mean in terms of binding?
What does it mean by the question. "Of what value to humans or to the body...
What does it mean by the question. "Of what value to humans or to the body of knowledge is the work described?"
what does a high value for miller units mean
what does a high value for miller units mean
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT