# Questions tagged [sample]

The tag has no usage guidance.

15 questions
Filter by
Sorted by
Tagged with
112 views

### Sampling data from numerical values of density distribution of nucleons

How could i sample my data which follows distribution if i have only numerical values of density distribution as an example data attached as in picture I tried but do not know how to do it. The data:...
82 views

### Sample the data with equal step size

I have the data below. I would like to sample with equal step size. For simplicity lets try unit step size. Here is the desired result. Find the first time exceed the unit time step, and take lower ...
223 views

### Random sample of big big numbers

Consider the following piece of code: m = 2; n = 6; samplesize = 1000; totalsize = 2^(n^m); numbersample = 2 RandomSample[Range[totalsize/2], samplesize]; With ...
372 views

### Sample over a matrix

Assume I have a matrix. ...
58 views

### Looking for an estimator for non-linear statistics

Goal We sample $n$ individuals with replacement and measure their trait values $x_i$ for all individual $i$. The variable $x$ is bounded [0,1]. Let $\mu$ be the ...
81 views

### Problems with sampling

Let $t\ge 0$ and let $f_{s}(t)$ be the sampled version of $f(t)$. If $$f(t)=\begin{cases}\int_{0}^{t}\exp\left(-\frac{1}{1-s^{2}}\right)\,ds,&|s|<1, \\ 0,&\text{otherwise}.\end{cases}$$ I ...
3k views

### How to sample points randomly below a curve? [duplicate]

How can I randomly select 1000 points uniformly from the shaded area below the plotted curve? Plot[1/π Cos[θ]^2, {θ, 0, 2 π}, Filling -> Bottom]
289 views

### Generate multiple integer variables with constant sum

I have asked similar question three day ago[The old question]. it was incorrectly marked as duplicated. This time I make this question more general and closer to reality. I want to build a model of N ...
2k views

### How to implement the sample-point process like the built-ins of Mathematica?

Consider this: pts = {{0, 0}, {1, 1}, {2, -1}, {3, 0}, {4, -2}, {5, 1}}; f = BSplineFunction[pts] I can use ParametricPlot to ...
237 views

### Draw from a given list according to empirical distribution

I have two lists, where each time I have age-income vectors. Given the distribution of age in the first list, I would like to draw a sample with the similar distribution of age from the second list (...
2k views

### How to obtain adaptive sampling as in Plot function?

Adaptive sampling in Plot function can capture the oscillation of a function with very few points. How can I get a similar sequence of point pairs without using <...
258 views

### Sampling Points Between Two Functions and Plotting Sample Points? (I have partial code) [duplicate]

I want to sample random points between $Cos(x)$ and $Sin(x)$ on $0 \le x\le \frac \pi4$ I was able to do graph the function here in Mathematica. I would like to count, and then plot points between ...
1k views

### Draw sample functions from Gaussian Process prior [closed]

Previously, I have written implementation codes of Gaussian Process regression in Python and Matlab. However, for better interaction and visualisation, I am currently working on implementation in ...