Skip to main content

Questions tagged [simulation]

A vast area which includes generating results from computer models.

3 votes
1 answer
71 views

How to show in R, using a simulation, that when sampling from a normal distribution, the sample mean and sample variance are independent

What is the best way to show that when sampling from a normal distribution, the sample mean and sample variance are independent? I know the theory behind this result, I would like to show it using a ...
Carlos233's user avatar
2 votes
1 answer
109 views

Simulate a distribution from a fitted beta-regression model for a density plot in R [duplicate]

I have produced the following figure by simulating some values from a fitted gamma regression with a low AIC value that provides the closest approximation of my raw data out of all of my models, and ...
ElizaBeso000's user avatar
0 votes
0 answers
41 views

Sample size in simulation and stopping criteria

I want to estimate the average of a random variable by simulation. Also, I want to estimate a proportion by simulation. I know that there are formulas to calculate the minimum sample size so that the ...
Vicent's user avatar
  • 789
0 votes
0 answers
31 views

Inference for Binomial proportion with estimated p but unknown N

Let's say I own a bakery that, among other desserts, sells one really tasty chocolate cake. It's so good that I've estimated that I've estimated 80% of my daily customers will buy a piece of cake, ...
stharms's user avatar
1 vote
1 answer
51 views

Simulating non-zero mean autoregressive (AR(2)) samples

I asked this question in stackoverflow, with no success. I am hoping that i might get some suggestions here. I am trying to generate non-zero mean AR(2) samples using statsmodels package. But it seems ...
Shew's user avatar
  • 297
0 votes
0 answers
23 views

Metropolis-Hastings on domain $(2, \infty)$

I'm trying to understand the Metropolis Hastings algorithm in depth by solving some exercise problems. On one of them, I'm asked to use MH to generate samples from $$f(x) = c \frac{1}{\theta}e^{-\frac{...
Christina Kataki's user avatar
1 vote
1 answer
64 views

Input-Output Correlations using PCA

I want to understand the correlation between a set of $\color{red}{\textrm{inputs}}$ and a set of $\color{blue}{\textrm{outputs}}$ deriving from numerical simulations, and possibly reduce dimensions ...
lukewarn's user avatar
2 votes
1 answer
286 views

Two-component Cox proportional hazards model Simulation

In an article that I have been reading, they have a simulation study: In this simulation, we generate $T_i$ from the following group-specific linear transformation model: $$H(T_i) = \beta_{k,1} X_{i,...
ADAM's user avatar
  • 741
2 votes
0 answers
57 views

Power sizing when sampling from a group with known subgroups

I need to do a power analysis of a group that is composed of three subgroups. The measurements to sample are difference measurements between two dogs of the same breed rated side by side. Dogs are ...
Estimate the estimators's user avatar
1 vote
0 answers
115 views

Tightness of rejection sampling

Hello. I'm studying the Monte Carlo Statistical Method textbook by Robert and Casella. I have a question about exercise problem 30 in Chapter 2. I've already solved parts (a)-(c), but I'm having ...
urikokp's user avatar
  • 31
2 votes
1 answer
93 views

Is it possible to use simulated (bootstrap) A/A tests of historic data to estimate the impact of confounding factors on the treatment effect?

I recently heard a proposal for a method to measure the degree to which confounding variables impact historic results of A/B tests. In order to ascertain the degree to which confounding has impacted ...
McGez's user avatar
  • 91
2 votes
0 answers
32 views

What are the steps to simulate data showing bias when missing data are MAR

I have been trying to simulate data that shows bias in the estimated regression coefficients when there is data Missing At Random. In this case I am not interested in the estimated coefficients ...
Lynchian's user avatar
  • 305
3 votes
0 answers
17 views

What are the expected residual standard deviations from each of the fitted models and data-generating process?

I simulate data to be analyzed using a linear mixed-effects model. It is based on an experiment with 2 levels (A and B) of a ...
Anderson's user avatar
2 votes
0 answers
55 views

How to Simulate Random Times from Gambler's Ruin?

I saw this question https://stats.stackexchange.com/a/518651/403725 where the distribution of "gambler ruin times" is derived (Discrete Phase Type Distribution): $$\mathbb{P}(T=t) = w_0 \...
Uk rain troll's user avatar
11 votes
1 answer
523 views

The probability that a Brownian bridge is a Brownian excursion

bb <- function() { y <<- c(0,sort(runif(9999)),1) x <<- seq(0,10000)/10000 y <<- y-x } plot(x,y,type="l",asp=30) abline(h=0) The R ...
Michael Hardy's user avatar

15 30 50 per page