Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
22 views

Recycling MCMC samples for another data set from the same distribution

Suppose I'm given $\theta_0$ and I want to sample data from a density $f(Y|\theta_0)$ and then sample from the posterior of $\theta|Y$ (given, obviously, some prior). I want to do this lots of times, ...
Thomas Lumley's user avatar
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
0 votes
0 answers
28 views

How to simulate multivariate posterior distribution with a flat prior in general?

If I know that the posterior $p(\theta_1,\dots,\theta_m|y)$ can be written $p(\theta_1|\theta_2,\dots,\theta_m,y)p(\theta_2|\theta_3,\dots,\theta_m|y)\dots p(\theta_m|y)$ where $p(\cdot|y)$ in each ...
user45765's user avatar
  • 1,465
9 votes
1 answer
359 views

Why does somebody argue that the number of bootstrap replications should not be a multiple of 10?

At a recent conference somebody claimed that the size of the bootstrap replications should always be 999 rather than 1000. Which argument supports this claim?
Mr Frog's user avatar
  • 349
0 votes
0 answers
66 views

Bootstrapping example ISL - pages 194-195

I'm currently learning about bootstrapping using the book Introduction to Statistical Learning, and am struggling to understand what the point of using the boot ...
h3ab74's user avatar
  • 133
0 votes
1 answer
139 views

Simulation using the fundamental theorem of simulation (MATLAB)

I have a sub-task of an assignment about the parametric bootstrap method. The subtask is to, given a students t-distribution with $5$ degrees of freedom, sample $10000$ draws using the fundamental ...
cittee's user avatar
  • 33
3 votes
1 answer
217 views

Ratio of Uniforms simulation

I am new to simulation methods and am currently learning about the ratio of uniforms method. The problem I am working on is to use the ratio-of-uniform method to create a random number generator in <...
Chris's user avatar
  • 33
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
0 votes
0 answers
15 views

How large should be a bootstrapping sample? [duplicate]

The technique of bootstrapping, a technique used to describe estimators using sample data, is described by Greene (Econometric Analysis, 8th ed.) as it follows: In such technique, sample size ($m$), ...
Incognito's user avatar
  • 141
1 vote
0 answers
33 views

Generate data for significance testing

I want to generate a data set with a pre-specified significance level. Let's say we have 2 covariates x1, x2, and an outcome variable y. We fit a linear regression model as follow: ...
Rasel Biswas's user avatar
2 votes
0 answers
68 views

Computationally estimate $E[f(\hat \beta_1 X)]$ where $\hat \beta_1$ is the estimated coefficient obtained by ordinary least squares regression?

Let $(X_1,Y_1),(X_2,Y_2),\dots,(X_5,Y_5)$ be i.i.d samples and consider the regression model $$ Y_i = \beta_0 + \beta_1 X_i + \varepsilon_i, \quad \quad \text{for} \ i \in \{1,2,\dots,5\}, $$ where $\...
Bertus101's user avatar
  • 805
7 votes
0 answers
62 views

Simulate correlate random variables with given marginal distribution where one is always larger

Is it possible to simulate pairs of random variables with a given marginal distribution and population correlation where one random variable is larger than the other? More formally, I need to simulate ...
Eli's user avatar
  • 2,692
1 vote
0 answers
51 views

Techniques to estimate biasedness and sampling distribution of b0, b1, and $\sigma$ and confidence/prediction intervals when assumptions are violated?

This question is for the linear regression model. Let's say one or more of the assumptions are violated. For example, heteroskedasticity, autocorrelation, or non normality. I was wondering if there ...
confused's user avatar
  • 3,263
1 vote
0 answers
39 views

Good list of references and books on statistical approximation, simulation and computational methods?

I am looking for books and resources that cover simulation and approximation techniques so that we do not have to follow the strict assumptions held by the many statistical models. With how fast ...
confused's user avatar
  • 3,263
1 vote
1 answer
48 views

In the following queuing problem what assumption led the author to assume the probability of each task happening at 1/180

I am going through this algorithms and data structure course which implements a queue DS to simulate a printing queue. Following is the solution described: To model this situation we need to use some ...
Coddy's user avatar
  • 111
1 vote
0 answers
557 views

Random-effects-meta-analysis-simulation: zero-estimates for tau^2

I am working on simulating a random-effects-model for comparison of the DerSimonian-Laird-method vs. Hartung-Knapp-Sidik-Jonkman-method in R. To do so, I chose different combinations of mu (true ...
feher's user avatar
  • 11
2 votes
0 answers
37 views

Simulation - problem of maximization inside a circle

I am doing some projects related to statistics simulation using R based on "Introduction to Scientific Programming and Simulation Using R". In the Students projects session (chapter 24), I am doing ...
Gabriel Monteiro's user avatar
2 votes
1 answer
947 views

Data perturbation with normal variables

I am doing some projects related to statistics simulation using R based on "Introduction to Scientific Programming and Simulation Using R". In the Students projects session (chapter 24), I am doing ...
Gabriel Monteiro's user avatar
9 votes
1 answer
155 views

sampling cost of $O(d)$ versus $O(2^d)$

I came across the following simulation problem: given a set $\{\omega_1,\ldots,\omega_d\}$ of known real numbers, a distribution on $\{-1,1\}^d$ is defined by $$\mathbb{P}(X=(x_1,\ldots,x_d))\propto (...
Xi'an's user avatar
  • 108k
6 votes
1 answer
558 views

sampling from an unnormalised distribution

If one has to sample (with replacement) from a population $(x_1,x_2,\ldots)$ with weights $(\omega_1,\omega_2,\ldots)$, possibly infinite (although this is asking too much without further details), a ...
Xi'an's user avatar
  • 108k
3 votes
1 answer
1k views

Infinite Variance of Harmonic Mean Estimator of Marginal Likelihood of Data

If y denotes the data and t denotes set of parameters, then the marginal likelihood is Here, is a proper prior, f(y|t) denotes the (conditional) likelihood and m(y) is used to denote the marginal ...
Dey's user avatar
  • 63
1 vote
0 answers
22 views

Summarizing results obtained in different scenarios by different methods

I have generated different scenarios which depends on certain parameters $x_1, \dots, x_k$. I have evaluated each scenario with different methods. Summarizing, I have a value $S(m,x_1, \dots, x_k)$ ...
marc1s's user avatar
  • 322
1 vote
0 answers
129 views

Simulate multinomial logistic regression model [duplicate]

I want to simulate multinomial logistic regression model i have 3 independent continuous variable. I need to simulate a dependent variable which have 5 levels with suitable beta coefficients. Please ...
Faisal Kamran Khan's user avatar
3 votes
2 answers
1k views

Simulation for the random vector (X,Y) with density f(x,y,a)

I need to generate data from a random vector with joint density $(X,Y)$ with density: $$ \frac{x^\alpha(x+y+2)}{x+y+1}e^{-x-y}~~~~~,\alpha,x,y> 0 $$ Do you have any hints on how to start?
albert's user avatar
  • 313
6 votes
2 answers
5k views

How to simulate random observations from a specific distribution?

I am asking for a general approach about how to construct algorithms akin to, for example, the rnorm function in R given that one has, say, a closed-form ...
Alexis's user avatar
  • 30.7k
3 votes
2 answers
970 views

How to transform a normal random variable such that I can simulate normal samples between the range of 1 and 45?

How to transform a normal random variable such that I can simulate normal samples between the range of 1 and 45? Do I need to do a jacobian transformation ?
user1769197's user avatar
  • 1,256
12 votes
3 answers
1k views

Using computer simulations to better understand statistical concepts at the graduate level

Hi I'm taking a graduate course in Statistics and we've been covering Test statistics, and other concepts. However, I am often able to apply the formulas and develop a sort-of intuition on how stuff ...
user1172468's user avatar
  • 2,055
10 votes
1 answer
11k views

How can I compute a posterior density estimate from a prior and likelihood?

I am trying to understand how to use Bayes' theorem to calculate a posterior but am getting stuck with the computational approach, e.g., in the following case it is not clear to me how to take the ...
Abe's user avatar
  • 3,901
5 votes
1 answer
238 views

Multiple simulations of a system under different conditions - paired data?

I am currently generating data by simulating a model of chemical system under different conditions (temperature) over time. In each simulation, the starting structure being modeled is exactly the same ...
N26's user avatar
  • 1,975