Skip to main content

Questions tagged [simulation]

A vast area which includes generating results from computer models.

72 votes
8 answers
122k views

How to simulate data that satisfy specific constraints such as having specific mean and standard deviation?

This question is motivated by my question on meta-analysis. But I imagine that it would also be useful in teaching contexts where you want to create a dataset that exactly mirrors an existing ...
Jeromy Anglim's user avatar
64 votes
5 answers
5k views

Why does collecting data until finding a significant result increase Type I error rate?

I was wondering exactly why collecting data until a significant result (e.g., $p \lt .05$) is obtained (i.e., p-hacking) increases the Type I error rate? I would also highly appreciate an ...
Reza's user avatar
  • 936
57 votes
2 answers
61k views

How to simulate artificial data for logistic regression?

I know I'm missing something in my understanding of logistic regression, and would really appreciate any help. As far as I understand it, the logistic regression assumes that the probability of a '1' ...
zorbar's user avatar
  • 767
47 votes
6 answers
9k views

When to use simulations?

So this is a very simple and basic question. However, when I was in school, I paid very little attention to the whole concept of simulations in class and that's left me a little terrified of that ...
AMathew's user avatar
  • 1,060
46 votes
9 answers
20k views

Approximate $e$ using Monte Carlo Simulation

I've been looking at Monte Carlo simulation recently, and have been using it to approximate constants such as $\pi$ (circle inside a rectangle, proportionate area). However, I'm unable to think of a ...
45 votes
2 answers
26k views

Simulation of logistic regression power analysis - designed experiments

This question is in response to an answer given by @Greg Snow in regards to a question I asked concerning power analysis with logistic regression and SAS ...
B_Miner's user avatar
  • 8,810
35 votes
3 answers
18k views

Why is it necessary to sample from the posterior distribution if we already KNOW the posterior distribution?

My understanding is that when using a Bayesian approach to estimate parameter values: The posterior distribution is the combination of the prior distribution and the likelihood distribution. We ...
Dave's user avatar
  • 2,651
34 votes
6 answers
11k views

Generating random numbers manually

How can I manually generate a random number from a given distribution, as for instance, 10 realisations from the standard normal distribution?
A-dude's user avatar
  • 480
33 votes
1 answer
34k views

Generate two variables with precise pre-specified correlation [duplicate]

UPDATE: Solution Thanks to Greg Snow for pointing out the empirical = TRUE command in mvrnorm (multivariate random normal stuff)! Here's the explicit code: ...
Jonas Lindeløv's user avatar
30 votes
5 answers
3k views

What are examples of statistical experiments that allow the calculation of the golden ratio?

There are some very simple experiences that can be done by a kid at home, whose result allows one to statistically approach famous numbers such as $\pi$ or $e$. An example where $\pi$ shows up is ...
rasmodius's user avatar
  • 1,733
29 votes
2 answers
6k views

How well does bootstrapping approximate the sampling distribution of an estimator?

Having recently studied bootstrap, I came up with a conceptual question that still puzzles me: You have a population, and you want to know a population attribute, i.e. $\theta=g(P)$, where I use $P$ ...
KevinKim's user avatar
  • 6,909
29 votes
1 answer
23k views

When would one use Gibbs sampling instead of Metropolis-Hastings?

There are different kinds of MCMC algorithms: Metropolis-Hastings Gibbs Importance/rejection sampling (related). Why would one use Gibbs sampling instead of Metropolis-Hastings? I suspect there ...
ShanZhengYang's user avatar
27 votes
2 answers
14k views

What is importance sampling?

I'm trying to learn reinforcement learning and this topic is really confusing to me. I have taken an introduction to statistics, but I just couldn't understand this topic intuitively.
Tienanh Nguyen's user avatar
25 votes
1 answer
3k views

How to create a multivariate Brownian Bridge?

It is known, that a standard multivariate Brownian bridge $ y(\mathbf u) $ is a centered Gaussian process with covariance function $$ \mathbb E(y(\mathbf u) y(\mathbf v)) = \prod_{j=1}^d (u_j \wedge ...
andeliyeasi's user avatar
24 votes
1 answer
4k views

How to sample from Cantor distribution?

What would be the best way to sample from Cantor distribution? It only has cdf and we can't invert it.
Tim's user avatar
  • 140k

15 30 50 per page
1
2 3 4 5
���
129