New answers tagged

9

One could consider the following alternatives to Jarle Tufto's most efficient solution: namely, transform back into $X$ a Gamma $\mathcal G(3/2,1/2)$ [or equivalently a $\chi^2_3$] variate rjt=function(n)sqrt(rgamma(n,3/2)*2)*sample(c(-1,1),n,rep=TRUE) use a numerical inverse of the cdf$$F(x)=\int_{-\infty}^x y^2\varphi(y)\,\text dy=\int_{-\infty}^x y\,\...


10

First of all, it is worth noting that the scaling constant in this case is the second raw moment of the standard normal distribution, which is: $$\int \limits_{\infty}^\infty x^2 \phi(x) \ dx = 1.$$ Consequently, your density function is: $$f(x) = \frac{x^2}{\sqrt{2 \pi}} \cdot \exp \Big( -\frac{x^2}{2} \Big) \quad \quad \quad \text{for all } x \in \mathbb{R}...


13

Some guesswork suggest that $X$ perhaps can be simulated by a suitable power-transformation of a Gamma random variable $Y$ multiplied by a random sign to make the resulting density symmetric about zero. If $Y$ has density $$f_Y(y)=\frac{\lambda^\alpha}{\Gamma(\alpha)}y^{\alpha-1}e^{-\lambda y},$$ then the density of $X=Y^k I$ where $P(I=-1)=P(I=1)=1/2$ ...


2

I'm no expert in the bootstrap, but I anticipate that using fewer samples in your bootstrap means that the uncertainty in mean will be inflated. The standard error of the sampling distribution is inversely proportional to the square root of the sample size. A smaller sample size thus means larger uncertainty in your estimates. Its easy to see evidence of ...


0

But from a practical POV I don't see why one would consider sampling without replacement given the advantages of with replacement. In practice, sampling without replacement saves you the need to, well, make replacements. This has two benefits: You can just take a larger sample and consider it as multiple individual samples. Replacements in the real world ...


2

Your notation for this problem is problematic, so I am going to use a different notation for the same thing. I will denote the vector of subsample means as $\bar{\mathbf{x}} = (\bar{x}_1, ..., \bar{x}_M)$ and $\mathbf{s} = (s_1,...,s_M)$. I also note that each subsample is of size $N$, so each of the elements of these vectors uses $N$ data points. Since ...


1

Comment: Checking @ERT's method (+1), with sample of $n=5000.$ Obvious procedures seem to be on target. set.seed(402) a = rchisq(5000, 2) b = runif(5000) x = sqrt(a)*cos(1*pi*b) summary(x); sd(x) Min. 1st Qu. Median Mean 3rd Qu. Max. -3.813066 -0.663294 0.016787 0.003001 0.663570 3.495904 [1] 0.9923197 # sample SD Passes ...


1

Well, you can generate a standard normal given two uniform random variables, without a chi-squared variable. Given uniform unit random samples ($U_1$ and $U_2$), Box-Mueller can be used to generate two i.i.d. standard normals $Z_0$ and $Z_1$ using the following formulas: $ Z_0 = \sqrt{-2\cdot ln(U_1)} \cdot cos(2\pi U_2) $ $ Z_1 = \sqrt{-2\cdot ln(U_1)} \...


2

Welcome to CV! (1) Sampling Distribution of Sample Statistics Given $D = \mathcal{N}$, what are these distributions I'm observing? They look normal, but aren't they t? a) Sample mean $\bar{X}$ $\frac{\bar{x}-\mu}{S/\sqrt{n}}\sim t_{n-1}$ - t distribution with $n-1$ degrees of freedom. b) Sample variance $S^2$ $\frac{(n-1)}{\sigma^2}S^2 \sim\chi^2_{n-1}$ chi-...


1

A binomial random variable is based on independent trials, often modeling sampling with replacement. A hypergeometric random variable is based on trials that are not independent, often modeling sampling without replacement. A major difference between the two models is that for 'comparable' situations, the hypergeometric random variable has a smaller variance....


5

This part of the book is wrong Your misgivings on this matter are appropriate, because this part of the book is wrong. Even when making inferences about infinite populations, random sampling does not give independent random variables --- it gives conditionally independent random variables, conditional on the empirical distribution of the underlying ...


11

This extract from the text suffers from ambiguity and incorrectness. Let's deal with the latter first. Independence of two random variables $X$ and $Y$ is not about one variable "providing no information about the first" (a remarkably ambiguous phrase in its own right!). Independence is strictly about probabilities and it means nothing more nor ...


0

I think you're overthinking it. When we conceptualize a study, and its sampling frame, we consider looking retrospectively at the outcomes, measured and unmeasured, from the study's completion. As noted in the example, the student plans to randomly sample days from the school year. So we can consider each of the year's 52*5 school days, and its associated ...


3

Your question do not admit short and exhaustive answer. The assumption you interested in $E[u|x]=0$, usually named exogeneity assumption, is crucial in Econometrics. Unfortunately exogeneity concept (and so related assumptions) is bad treated, many problems come from that. I wrote a lot about them, I suggest you some related discussion that can help: The ...


1

Suppose we have $n$ observations, with $m$ classes so far, and we want to determine the total number $c$ of classes. With a maximum likelihood approach, the most likely scenario is that all the classes have been observed if $$n> 1+(m+\frac12)\log(m)$$ The probability of observing exactly $m$ classes after the first $n$ observations is $$p(c)=\binom{c}{m}m^...


0

Due to the underspecification problem, it's hard for us to calculate the sample size because we don't know if the model performs well by skill or just by luck. But we can start off with the sample size calculated using the method I provided in the previous answer and do bootstrap sampling several times each time with a larger sample size. We can check the ...


1

You have 240 measurements in all. (a) If your one-way ANOVA would have 12 levels (A1, A2, A3 ,A4, B1, ..., C4), each with 20 replications, that might be OK for a start. Model: $$Y_{ik} = \mu + \alpha_i + e_{ik},$$ where $i = 1,2,\dots,12$ levels, $k=1,2,\dots,20$ replications, and $e_{ik} \stackrel{iid}{\sim} \mathsf{Norm}(0,\sigma).$ Rows in the ANOVA table ...


1

Here is an alternative setup within the framework of the superpopulation model of sampling theory. It differs in notation and conception to classical sampling theory, but I think it is quite simple and intuitive. Let $X_1,X_2,X_3,...$ be an exchangeable "superpopulation" of values. Take the first $N$ values to be the finite population of interest ...


2

As for the derivation, the setup goes as follows. Suppose we have a population of size $N$, with mean $\mu$ and variance $\sigma^2$, where each element can assume values $v_k$ for $k = 1, 2, \dots, m$. Let $n_k$ be the number of times that the value $v_k$ occurs in the population, such that the probability that we draw the value $v_k$ at random from the ...


1

The simplest approach would be to sample Player 2's card first. With equal probability of 33%, he gets an A, K or Q. If Player 2 got an A, Player 1 gets a K and Player 3 a Q. If Player 2 got a K, Player 1 gets a Q and Player 3 an A. If Player 2 got a Q, Player 1 gets a K and Player 3 an A. Overall, Player 1 has a 66% chance of getting a K (33% each of ...


2

Both quantities are acceptance probabilities, assuming of course that the dominating inequality$$\sup_{z\in\mathfrak X}\dfrac{\tilde {p}(z)}{kq(z)}\le 1$$holds. First, the quantity$$\dfrac{\tilde {p}(z)}{kq(z)}$$is the conditional probability of acceptance given that $z$ is the outcome of a (marginal) simulation from $q(\cdot)$. Defining the indicator random ...


1

It looks like the metrics I was looking for were positive and negative predictive value (PPV/NPV). These are defined as the proportion of predicted positive examples that are true positives, and the proportion of predicted negative examples that are true negatives, respectively. I would love to see a better answer if there is a way to convert from these to ...


Top 50 recent answers are included