All Questions

Tagged with
115 questions
Filter by
Sorted by
Tagged with
520 views

How to generate conditioned random variables from a density function?

I want to generate random variables from a distribution function using inverse sampling with the additional condition that the sampling should be conditioned, i.e., random generated variables should ...
576 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 ...
4k views

Sample from distribution given by histogram

Given a histogram obtained using given data points, how do I randomly sample from the distribution predicted by the histogram? Any conceptual comment / R code would be welcome.
243 views

sample of arbitrary length from large list without replacement

I'm interested in sampling a large dataset in nonconsecutive-record sequences of arbitrary length without overlap. I know from How to take many samples of 10 from a large list, without replacement ...
148 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 ...
68 views

Compare 2 populations and find subset in one population similar to other

I have 2 different populations who are being offered the same product. I am being asked to find a subset of people in one population (on which I have control to run an experiment) who mimic the other ...
444 views

Central Limit Theorem for R coding assignment

I had a homework assignment asking us to code some basic things in R. Here are the tasks: Generate a Gamma(1,2) population of size N=5000 and show its density plot and descriptive statistics. Create ...
2k views

Problems generating a sample from a custom distribution with log

I'm trying to generate a sample from a family of distributions. In particular I would like to be able to obtain a sample from the survival function: $$1-F(x) = c x^{-a} \log^b(x)$$ with a proper ...
394 views

Sampling method for imbalanced data?

I have an imbalanced dataset with 4995:5 ratio as well as other datasets with less imbalanced ratios. I split this 4995:5 ratio into training and testing for about 2/3 training and 1/3 testing. I also ...
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 ...
819 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} ...
487 views

How to test if social structure is non-random and resulting from genetic relatedness – and how to deal with demography effect

I am trying to construct (undirected) social network based on co-occurence of individuals. Clustering algorithm will be later applied on this network to find some distinct subgroups. Issue is that ...
3k views

Using Uniform Distribution to Generate Correlated Random Samples in R

[On recent questions I was looking into generating random vectors in R, and I wanted to share that "research" as an independent Q&A on a specific point.] Generating random data with correlation ...
2k views

Systematic Sampling with unequal probabilities

I found the library Sampling in R to conduct a systematic random sampling with unequal probabilities. I got my sample but I really don't know how that sample is selected. Is there anyone that can ...