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
2 votes
1 answer
52 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 ...
2 votes
0 answers
54 views

Mathematica unable to realize simple distributional relationship

I was trying to find the CDF for the following problem: ...
2 votes
2 answers
96 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 ...
  • 21k
16 votes
4 answers
535 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? ...
3 votes
3 answers
211 views

Drawing a shaded area under a probability distribution

...
  • 797
0 votes
1 answer
51 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: ...
  • 797
1 vote
0 answers
48 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....
  • 21k
-1 votes
2 answers
88 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 ...
4 votes
3 answers
943 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 ...
  • 797
5 votes
1 answer
73 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., ...
  • 3,140
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 ...
  • 1,314
0 votes
1 answer
51 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. ...
  • 1,314
0 votes
0 answers
33 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 ...
  • 151
0 votes
0 answers
42 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 ...
0 votes
0 answers
25 views

How to use this code to draw the corresponding table?

...
  • 797
0 votes
1 answer
85 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 ...
0 votes
1 answer
50 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 ...
  • 797
2 votes
2 answers
62 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 ...
  • 21k
3 votes
1 answer
74 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)}$$ ...
0 votes
1 answer
103 views

How to find Specific Fit of a Distribution?

I want to fit a data set: ...
  • 1,238
2 votes
1 answer
50 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: ...
  • 21
0 votes
0 answers
34 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 ...
  • 181
1 vote
2 answers
118 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 ...
  • 173
1 vote
1 answer
106 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 ...
  • 181
2 votes
1 answer
92 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 ...
0 votes
0 answers
72 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. ...
5 votes
1 answer
82 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. ...
0 votes
1 answer
74 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
62 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, \...
0 votes
0 answers
29 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): ...
  • 101
1 vote
3 answers
127 views

Incorrect result of ParameterMixtureDistribution

Let us consider in 13.1 on Windows 10 ...
  • 21k
1 vote
0 answers
26 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$...
2 votes
1 answer
99 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?
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 ...
2 votes
2 answers
105 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 ...
  • 1,867
1 vote
2 answers
75 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/...
  • 155
1 vote
0 answers
28 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.
  • 607
2 votes
3 answers
73 views

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

...
  • 107
2 votes
2 answers
94 views

Forming custom dice with given joint distribution

I am interested in the following problem. I want to decorate the faces of $n$ six-sided dice with integers, such that (as closely as possible, for some reasonable definition of "close") they ...
1 vote
1 answer
93 views

How can I calculate the Euclidean metric in $l^2$ for two functions in Mathematica? [closed]

I have two functions, $f(x)=\sin x$ and $g(x)=\sin\frac{pi}{4}x$, and I want to calculate the average Euclidean metric as an expected value to score for the average distance between the two functions ...
  • 991
4 votes
3 answers
432 views

How to plot the the maximum likelihood estimates?

I would like to find the code for the graphical representation of the maximum likelihood estimates. For that first, I find the estimate values using the the code given below ...
0 votes
0 answers
60 views

Does mathematica allow abstract probability manipulation

Does Mathematica allow testing abstract algebraic relationships with probabilities? For example, checking a relationship between probabilities without expressing the form (e.g. binomial etc.) of these ...
  • 101
3 votes
2 answers
144 views

Simplifications assuming function is a probability distribution

Is it possible to define a generic probability distribution function (pdf) so Mathematica can use its properties to simplify expressions? For example: ...
  • 131
1 vote
1 answer
88 views

Unclear piece of the documentation to BinomialDistribution

Looking in the documentation , I read The probability density and cumulative distribution functions may be given using PDF[BinomialDistribution[n,p],x] and ...
  • 21k
2 votes
1 answer
104 views

How to Work Student t-Distribution

I'm working with the sampling distribution of the sample mean and sample variance. For my data, I have the following sample mean = 0.418, standard deviation = 0.306, and degrees of freedom = 44. I've ...
  • 1,393
0 votes
0 answers
34 views

How does Mathematica work with multivariate distributions?

I recently found the AEP algorithm. Curious how Mathematica would handle the situation, I made an experiment: ...
1 vote
2 answers
138 views

Linear extrapolation

My question is not really related to Mathematica; however, I put it in a way that uses Mathematica, so perhaps someone could help here. I'm given a set of data as ...
user avatar
0 votes
0 answers
23 views

How to retrieve the support of a multivariate distribution

I have the following process: ...
  • 151
6 votes
1 answer
271 views

Mathematica Related Book, Website or Github on Bayesian Statistics/Analysis

I just started working on Analysis with Mathematica, and I am loving every bit of it. I was wondering if there is a similar book geared toward bayesian statistics with mathematical? An alternative ...
1 vote
1 answer
49 views

Mean of List of Coordinates

Imagine I have the following list l = {{1, 2}, {1, 3}, {2, 4}, {2, 2}, {2, 3}} I want to take the mean only regarding the second element. That is, I want to find ...
  • 4,362

1
2 3 4 5
36