All Questions

Tagged with
Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

Generating variables using R

Question: Assume 2 treatments, 1 and 0. Given 120 participants, generate underlying truth with Age as a discrete uniform distribution over integers between [20-60] Gender (G) as $I\{G = F\} \sim \...
9
votes
2answers
1k views

Inverse CDF sampling for a mixed distribution

The out-of-context short version Let $y$ be a random variable with CDF $$ F(\cdot) \equiv \cases{\theta & y = 0 \\ \theta + (1-\theta) \times \text{CDF}_{\text{log-normal}}(\cdot; \mu, \sigma) &...
0
votes
0answers
28 views

Permutation of datasets to check accuracy of class labels

Currently I am using a proteomics dataset to compare 4 different disorders to healthy controls. Ultimately, I want to find unique and overlapping factors (that are deviant from healthy controls) in ...
2
votes
2answers
841 views

Get quantile function of dynamic mixture model

I have a dynamic mixture distribution fitted to my risk data (i.e., I have all parameters) of Weibull and Generalized Pareto, with a Cauchy CDF mixing function, that can be written as: \begin{align} ...
1
vote
0answers
339 views

How are the null distributions created for hypothesis testing?

I'm struggling to connect the idea of a sampling distribution of a test statistic to the null distribution. If I run many simple linear regressions on samples extracted from a population of data I ...
3
votes
3answers
267 views

How to sample from a distribution so that mean of samples equals expected value?

Given a random variable $X$, how do I have obtain $N$ random variates of $X$ so that the mean value of my samples equals the expected value of $X$? E.g. let $X$ have uniform distribution on the ...
7
votes
1answer
602 views

Probability of failure in a finite population

I regularly inspect finite populations for failures (we make custom products in batches of ~500-800). Currently, we inspect every product for failure, which is quite a bit of work. I want to reduce ...
6
votes
1answer
158 views

Generate tail of distribution by a given sample in R

I have a sample of measurements from a real life device which misses all the measurements that are less than some threshold (given device is not precise enough). From theory and also measurements ...
5
votes
1answer
79 views

Testing whether sampling (convex polytope) is uniform

Currently, I am sampling points from: i) a convex polytope (i.e. Ax <= b) ii) a high dimensional simplex The algorithms I am using are hit-and-run and a simple version of Bayesian bootstrap. I ...
2
votes
4answers
5k views

Sampling data to have specific mean and standard deviation [duplicate]

I have a data that I want to sample such the resultant distribution of values should have specified mean and standard deviation. I can think of rejection sampling to achieve this however that seems to ...
2
votes
1answer
3k views

The sample size applied to a non-normal distribution

I have a single variable that represents my population values (sample of data): ...
0
votes
1answer
1k views

R: Density estimation vs Histogram Estimation

To draw random samples from a custom distribution, I recall reading that KDE's are better than histograms. (See hadley's comment here.) When I experimented in R, I am finding that the KDE method ...