Questions tagged [probability-or-statistics]

Questions about systematic data collection and organization, or the application of probability theory to model the inherent patterns and properties of sampled data, underlying data distribution(s) or random processes.

Filter by
Sorted by
Tagged with
1 vote
2 answers
71 views

The problem of finding the maximum coefficient term in the binomial expansion,Find the value range of K

The problem is shown in the figure, and the result should be the range of K obtained at the end of the image ...
csn899's user avatar
  • 1,373
2 votes
3 answers
116 views

How to find the K value in the probability inequality of binomial distribution?

dist = BinomialDistribution[100, 1/3] Solve[{PDF[dist, k] >= PDF[dist, k - 1], PDF[dist, k] >= PDF[dist, k + 1]}, k] // FullSimplify In this binomial ...
csn899's user avatar
  • 1,373
7 votes
5 answers
321 views

Quickly simulating "mean-time until collision"

Edit high-level summary of problem/solutions in Mathematica community post Suppose I draw (with replacement) $k$ colored balls from bins with probabilities $h_1,\ldots,h_d$ until some color is drawn ...
Yaroslav Bulatov's user avatar
0 votes
0 answers
59 views

Mapping a vector to a unique number using statistical coefficients and vice versa [migrated]

Working with sequences of various dimensions of random integers, I saw that Wolfram Alpha provides information on a number of statistical indicators for this sequence. Among these indicators, for ...
dtn's user avatar
  • 2,344
2 votes
2 answers
73 views

Work-arounds to InverseFunction not evaluating?

Inverse CDF of Marchenko Pastur fails to evaluate at seemingly random points as you can see below. Is there an easy workaround? ...
Yaroslav Bulatov's user avatar
3 votes
2 answers
133 views

Non-uniform birthday problem in Mathematica

Suppose my year has $d$ days. I have a vector of probabilities of being born on those days as $h=p_1,\ldots,p_d$, and want to estimate the smallest $k$ such that probability of of birthday collision (...
Yaroslav Bulatov's user avatar
3 votes
0 answers
152 views

FindDistribution analog: automated data modeling with all Wolfram statistical distributions

BOUNTY GOAL To get bounty I am asking to build a function that serves as an analog of FindDistribution. You can also simply re-implement ...
Vitaliy Kaurov's user avatar
7 votes
1 answer
116 views

Get All Discrete Univariate Distributions with Symbolic Parameters

I am trying to get all Discrete Univariate Distributions with symbolic arguments from any place in Wolfram Language system. For example this guide: http://reference.wolfram.com/language/guide/...
Vitaliy Kaurov's user avatar
7 votes
6 answers
749 views

How to find this probability?

I am solving a problem from 17th Kolmogorov competition. Let $X_1,X_2,\dots,X_{50}$ be IID discrete random variables s.t. the probability of $X_1=-1$ equals $\frac 1 9$, the probability of $X_1=- \...
user64494's user avatar
4 votes
4 answers
242 views

Incorrect results of Mean and Variance of TransformedDistribution

I am solving a problem from 17th Kolmogorov competition. Let $(x,y)$ be a Gaussian random vector with mean $(0,0)$ and a covariance matrix $$\left(\begin{array}{cc} 1&r\\r&1\end{array} \right),...
user64494's user avatar
7 votes
2 answers
176 views

Measurement error propagation onto fitting-parameters

I have a dataset consisting of (t,y) Tuples, where each y has a known measurement error (standard deviation). I would like to fit a trapaze-function into the data and obtain the fitting paramaters and ...
Julius Debus's user avatar
0 votes
1 answer
33 views

Expression for variance of a truncated distribution as a function of the point of truncation

I am working on a project where I need to calculate variance of a truncated distribution. Suppose $X$ has some distribution and $x\in\mathbb{R}$. I am interested in $var(X|X\leq x)$. Given some ...
Jan's user avatar
  • 143
2 votes
1 answer
63 views

Moment problem for a discrete probability distribution

Is there an elegant way to use Mathematica to find entries of a discrete probability distribution $\{p_i\}$ by using a finite number of calls to $m(t)=\sum_i p_i^t$? There's a wikipedia article on ...
Yaroslav Bulatov's user avatar
2 votes
0 answers
58 views

Mathematica unable to realize simple distributional relationship

I was trying to find the CDF for the following problem: ...
Thomas Ahle's user avatar
2 votes
2 answers
105 views

Why the difference in these results of estimating the parameters of Erlang distribution?

Investigating (in 13.2 on Windows 10) the FindDistributionParameters command for learning purpose, I consider a small sample ...
user64494's user avatar
16 votes
4 answers
599 views

Speeding up Gaussian sampling

Edit Greg Hurst answers show how to independently get 3x speed-up using single-threaded MKL implementation and 4x speed-up by using native implementation with multi-threading, can they be combined? ...
Yaroslav Bulatov's user avatar
3 votes
3 answers
233 views

Drawing a shaded area under a probability distribution

...
csn899's user avatar
  • 1,373
0 votes
1 answer
63 views

How to find the regression line equation of these two groups of data and draw the scatter diagram and regression line?

These two sets of data are as follows: ...
csn899's user avatar
  • 1,373
1 vote
1 answer
106 views

Why isn't that conditional expectation calculated directly?

I mean Expectation[y \[Conditioned] x/y == t, {x \[Distributed] ExponentialDistribution[2], y \[Distributed] ExponentialDistribution[3]}] returns the input in 13....
user64494's user avatar
-1 votes
2 answers
91 views

Help regarding an integral in about certain probability [closed]

In the following $V$ is an uniform variate in $(0,1)$ ,$T$ is another independent random variable with CDF $t^{n-1} $and $u>1$ is a parameter.A friend sought help in an assignment in the ...
AgnostMystic's user avatar
4 votes
3 answers
958 views

How to calculate the number of prime numbers in a group of numbers?

If two different numbers are randomly selected from seven integers from 2 to 8, what is the probability of the two numbers being mutually prime? Take 2 different numbers randomly from 7 integers from ...
csn899's user avatar
  • 1,373
5 votes
1 answer
79 views

How to Find a Weighing Matrix of Size n?

Weighting matrices appear in the statistical design of experiments (Weighting Matrices and Statistical Design of Experiments. A weighting matrix is a generalization of Hadamard matrices, e.g., ...
Craig Carter's user avatar
  • 3,597
3 votes
1 answer
89 views

Is it normal that adding constraints on the parameters of NonlinearModelFit increases execution time 100 times??

Normally, reducing the optimization domain by adding constraints should reduce the time of execution. In my case however, this puts the NonlinearModelFit in a coma. Without constraints, 8 seconds ...
florin's user avatar
  • 1,418
0 votes
1 answer
59 views

Can constraints on the parameters be imposed in NonlinearModelFit? [closed]

Hi I cannot figure out this from the documentation of this command. For example, take one of the examples in the documentation, where I also added initial guesses for the parameters. ...
florin's user avatar
  • 1,418
0 votes
0 answers
38 views

How to define a multivariate region of space on which to minimize a function?

My objective is to optimize a function that takes two vectors as argument: a parameter vector of probability to be optimized on, and the input data. In other words am trying to tell Mathematica that ...
WaterFox's user avatar
  • 185
0 votes
0 answers
43 views

Was there ever a package called "BinThis"?

I'm working my way through someone's old code and rebuilding it. In one of the notebooks it appears they used a package called "BinThis" which I cannot seem to find any documentation for or ...
chicago.physicist's user avatar
0 votes
0 answers
27 views

How to use this code to draw the corresponding table?

...
csn899's user avatar
  • 1,373
0 votes
1 answer
89 views

How to plot a hazard function?

I would like to plot a hazard function when the CDF and PDF are not in the closed form. The PDF and CDF are given below ...
Deepthy Gs's user avatar
0 votes
1 answer
54 views

How to Chi-square test in statistics? [duplicate]

Can we be 99% sure that there is a difference between the health habits of the group suffering from the disease and the group not suffering from the disease? The calculation formula and data are shown ...
csn899's user avatar
  • 1,373
2 votes
2 answers
72 views

How to calculate that conditional expectation?

I mean the expectation of x*z under the conditions (y + z == 8) && (z*w == 2) && (w + y == 1), where ...
user64494's user avatar
3 votes
1 answer
79 views

Calculating a conditional expectation

Suppose that $X$ follows a beta distribution with parameters $\alpha > 0$, $\beta > 0$. I want to calculate $$\frac{\int_c^1 x f(x) dx}{P(X \geq c)} - \frac{\int_0^c x f(x) dx}{P(X \leq c)}$$ ...
afreelunch's user avatar
0 votes
1 answer
106 views

How to find Specific Fit of a Distribution?

I want to fit a data set: ...
SAC's user avatar
  • 1,295
2 votes
1 answer
53 views

Standard Deviation of Non-Rectangular Array

I have a list of about 700 smaller lists, most with different dimensions. They range from 1 element to 18 elements long. Think like: ...
Claudia's user avatar
  • 21
1 vote
0 answers
57 views

Specific Fox H-function becomes a constatnt function

The Fox H-function FoxH[{{{1/3, 2/3}}, {{1/2, 1/2}}}, {{{0, 1}}, {{1/2, 1/2}}}, x] has the same numerical value, 0.431029, at an arbitrary x value. This specific ...
student's user avatar
  • 191
1 vote
2 answers
125 views

Probability of a point being from the same distribution as sample [closed]

I have a sample of two-dimensional points {{x_,y_1},..{x_n,y_n}}, I've built a linear regression line, there seems to be a correlation between X and Y (Pearson's 0.662 if that matters). Now what I ...
user15933's user avatar
  • 173
1 vote
1 answer
113 views

Express the PDF of StableDistribution in terms of FoxH for the case of alpha values grater than 1

The PDF of StableDistribution in terms of FoxH for the case $\alpha\leq 1$ is available at https://reference.wolfram.com/language/ref/FoxH.html namely ...
student's user avatar
  • 191
2 votes
1 answer
99 views

Use Mathematica to solve equation derive the probability distributions using the Principle of Maximum Entropy

I am reading the article Deriving probability distributions using the Principle of Maximum Entropy and trying to derive some of the equations in it automatically using Mathematica. I want to solve the ...
benjaminchanming's user avatar
0 votes
0 answers
76 views

Use Mathematica to derive the probability distributions using the Principle of Maximum Entropy

I am reading the article of Deriving probability distributions using the Principle of Maximum Entropy and I am trying to derive some of the equations in it automatically using Mathematica. 1. ...
benjaminchanming's user avatar
5 votes
1 answer
94 views

Calculating Percentile of a data set [closed]

Can anyone help me how to compute 25$^{\text{th}}$, 50$^{\text{th}}$, 75$^{\text{th}}$ and 90$^{\text{th}}$ perecentile of a dataset. ...
Deepthy Gs's user avatar
0 votes
1 answer
75 views

I want to increment the data one by one so that the histogram changes in Manipulate

BarChart[{1,2,3,4,5,6,7,8,9}] How can I pre-populate the data from this source code and move it with Manipulate to show how the ...
user avatar
0 votes
1 answer
65 views

Conditional Expectation of an autoregressive (AR1) Process

Suppose X is a time series that follows the process: $X[t]=\rho X[t-1] + \varepsilon[t]$ where $\varepsilon[t] \sim \mathcal{N}(0.0, \sigma)$, $\varepsilon[t]$ is IID and $X[0] \sim \mathcal{N}(0.0, \...
Baba Yara Fahiz's user avatar
0 votes
0 answers
30 views

Solving a system of equations with distributional constraints

I'd like to generate samples of real numbers respecting distributional constraints. I tried (here, for a sample of 17 reals): ...
Raoul's user avatar
  • 101
1 vote
3 answers
131 views

Incorrect result of ParameterMixtureDistribution

Let us consider in 13.1 on Windows 10 ...
user64494's user avatar
1 vote
0 answers
28 views

Repeatedly sampling posteriors for Bayesian inference + convergence

I start with some prior, $\Theta$, with PMF $f_{\theta}(\theta)$. $\theta$ is the probability of an event, $X$, yielding a success. Then, I use Monte-Carlo simulation to sample a $\theta$ from $\Theta$...
corduroy0898's user avatar
2 votes
1 answer
110 views

Binomial distribution where probability parameter is also a distribution

Suppose I have $J \sim$ Bin$(25, P)$, but instead of having fixed $P$, I have a known PDF for continuous $P$, given by $f_{P}(p)$. How would I find $\mathbb{E}[J]$, given this to be the case?
corduroy0898's user avatar
3 votes
0 answers
74 views

Computing First Moment of TransformedDistribution slow. Is there a way to speed things up? If not, can you help me understand why its slow?

I'm a novice Mathematica program, toying with the idea of solving for the first four moments of a linear combination of a multivariate Gaussian mixture distribution. The first two moments I have ...
hipHopMetropolisHastings's user avatar
2 votes
2 answers
106 views

Infer Parameters of LogNormalDistribution

I am trying to explore whether Mathematica can help me infer the parameters of a LogNormalDistribution from observing the values of some integrals. For example, I ...
Nicholas G's user avatar
  • 1,911
1 vote
2 answers
85 views

How to sample from a `MultinormalDistribution` with a positive semidefinite covariance matrix?

I'm trying to sample from a Gaussian process (GP) following these tutorials: https://peterroelants.github.io/posts/gaussian-process-tutorial/#Sampling-from-prior https://stephens999.github.io/...
ForceBru's user avatar
  • 155
1 vote
0 answers
30 views

QQ plot with confidence intervals

How do I plot a QQ plot with confidence interval bands? QuantilePlot does not seem to have an option to do this. This is easily done in R. Thanks in advance.
EGME's user avatar
  • 617
2 votes
3 answers
73 views

Generating random samples from normal distributions with parameters coming from a list

...
nutan's user avatar
  • 107

1
2 3 4 5
37