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
17
votes
4answers
1k views

Does Mathematica have an implementation of the Poisson binomial distribution?

I need to work out the probability of having $k$ successful trials out of a total of $n$ when success probabilities are heterogeneous. This calculation relates to the Poisson Binomial Distribution. ...
0
votes
1answer
41 views

Plotting three related distributions on the same axis

The following solution to this problem was found by @Wolfies: ...
1
vote
2answers
82 views

Computing the Expectation

The following solution to this problem was found by @Wolfies: ...
2
votes
1answer
61 views

How to plot Intensity of SmoothKernelDistribution?

For example, we have a list of values data = RandomVariate[NormalDistribution[], 10^3]; then SmoothHistogram[data] By ...
0
votes
1answer
65 views

Solve a constrained four-dimensional integration problem for a “magic simplex” probability

Equation (7) in the 2012 paper, "Complementarity Reveals Bound Entanglement of Two Twisted Photons" of B. C. Hiesmayr and W. Löffler for a state $\rho_d$ in the "magic simplex" of Bell states \begin{...
3
votes
2answers
147 views

TransformedDistribution with Conditioned

Is the following attempt beyond Mathematica 11? ...
2
votes
1answer
47 views

Calculate plausibility in Dempster-Shafer theory

I want to use Mathematica to show which subsets of a power set are required to calculate the plausibility for a given set in a power set. This has lead me to compute a summation with a ...
1
vote
1answer
90 views

Generate a uniform distribution over an $n$-simplex employing quasi-random low-discrepancy points

This post is intended in a similar direction to an earlier one Can I use Compile to speed up InverseCDF? . I now wish to generate uniform points in an $n$-simplex (specifically $n=8$), making use of ...
4
votes
0answers
97 views

Fit Markov Chain

Assume a simple Markov Chain with the transition matrix ...
0
votes
1answer
82 views

Problem with solve

I need to solve this function, but I cannot copy mathematical function, so I display in picture, sorry ...
0
votes
2answers
103 views

How to Sample from a Probability Density Function

I've done a pretty good job working my way through and understanding the various ways to calculate the differences between probability distributions through Kullback Leibler Divergence and was happy ...
0
votes
0answers
28 views

How to represent nodes in a probability tree

I was trying to investigate the following problem I made up: A bag contains n distinctly coloured marbles. A marble is drawn at random. It is replaced and a second identical marble of the same colour ...
2
votes
1answer
84 views

Compute the potential of confusion between two matrices

I have a problem. Any help will be appreciated. In order to calculate the accuracy, sensitivity, sensibility and F1 score between diseases and their symptoms, I have two matrices with a different ...
0
votes
0answers
48 views

Estimated LogMultinormalDistribution

How to use procedures designed for EventData for an event data in the bivariate form? That means the bivariate data containing each of the four combinations ...
1
vote
1answer
84 views

Plotting 90% confidence ellipses for a gaussian pdf with small variances

Mathematica noob here, and I'm having some issues plotting 90% confidence ellipses of a small-variance 2D Gaussian PDF. I have it working perfectly fine for larger covariance matrices, but absolutely ...
1
vote
0answers
98 views

What's the usefulness of SymmetricMatrixQ and PositiveDefiniteQ if they fail with this matrix?

Let's define ...
1
vote
0answers
59 views

Noise covariance matrix

I am trying to find the noise covariance matrix of a random vector $\mathbf{x}$ with itself. The elements of this vector represent image pixels and are treated as random variables i.e, $\mathbf{x}=\{...
0
votes
1answer
42 views

Expectation of two independent random variables

I would like to compute the following function of two independent random variables: ...
5
votes
3answers
135 views

Slow performance of TransformedDistribution

I am trying to use TransformedDistribution for a data analysis task. The distribution performs well with RandomVariate applied. ...
1
vote
1answer
74 views

Drawing from InverseWishartMatrixDistribution. A machine precision error?

I'm drawing from the Inverse-Wishart Distribution, but I got the following error message: ...
12
votes
2answers
284 views

Plot of histogram similar to output from @risk

In order to analyze simulated data, @risk provides a histogram with handle bars, so that we can move these handles to see what proportion of data are on each side. For example, . I am trying to ...
1
vote
2answers
78 views

Multiple unique random samples?

I'm trying to produce $n$ random samples from a list, but not all samples, and I'd like the samples to not repeat in the same execution of the command. If I'm not mistaken, something like ...
0
votes
0answers
60 views

Perform a constrained integration over $[-1,1]^6--yielding a “separability probability”

To begin with, I have a set of three positivity constraints (ensuring the positivity of a certain (twelve-parameter) $6 \times 6$ "density matrix", denoted in the standard manner as $\rho$, namely, <...
1
vote
1answer
99 views

How can I make a frequency plot of successful trials? [closed]

I have got different files with the result of an experiment varying 2 variables. The files are in this link. Each file has 3 columns of data: the first column is the same for all the rows of the file ...
6
votes
2answers
173 views

Transformation of random variables and joint distributions

Given a variable $y_i$, normally distributed with 0 mean and $σ_y$ standard deviation $y_i$ ~ NormalDistribution[0,$σ_y$ ] I want to obtain with Mathematica: The distribution of: $x = \bar{y} = \...
2
votes
0answers
114 views

Renaming one parameter changes the result of Simplify

Surely the following couple of expressions should both output True: ...
4
votes
2answers
243 views

Problem with TransformedDistribution

I am trying to use Mathematica to obtain the probability distribution of $\frac{1}{2}(A + B)$ where $A$ and $B$ are independent random variables each distributed according to the uniform distribution, ...
0
votes
0answers
65 views

Approximate/estimate the ratio of two multidimensional constrained integrals

I have a hypothesis that a certain "qubit-qutrit separability probability" should assume the value $\frac{5}{3} \left(112 \pi ^2-1105\right) \approx 0.659488$. In its initial formulation, this is a ...
2
votes
3answers
196 views

Compute a certain “separability probability” via a constrained 4D integration over $[-1,1]^4$

I have employed the GenericCylindricalDecomposition command (applied to $6 \times 6$ "density matrix" positivity constraints) to compute the following expression ...
2
votes
0answers
42 views

Matrix of deviate scores

I am trying to replicate some steps in Jonathon D. Brown's text "Linear Models in Matrix Form: A Hands-On Approach for the Behavioral Sciences" Brown, 2014, p.12. I am creating a "matrix of deviate ...
0
votes
1answer
66 views

Autocorrelated random field generation

Problem is related with my other question So, generate exponentially correlated row $𝑥_{0,0},𝑥_{1,0}...𝑥_{𝑛,0}$ and starting from 𝑥0,0 there will be a correlated column $𝑥_{0,1},𝑥_{0,2}...𝑥_{...
3
votes
2answers
77 views

Generating FittedModels from vector-valued linear model fits

I have vector-valued data with normally distributed noise that I want to analyse. Assumptions on data can be made; in this specific example, it's expected that components of fitted vector values ...
4
votes
2answers
76 views

ProbabilityDistribution with variable number of dimensions

I would like to construct a ProbabilityDistribution with a variable number of dimensions. I tried to use $Assumptions = x ∈ Vectors[d, Reals] so that the variable <...
3
votes
1answer
57 views

Using an offset variable in a Poisson GeneralizedLinearModelFit

In section "2.6 Exposure: Modeling Over Time, Area, and Space" of his book "Modeling Count Data" Joseph M Hilbe uses an offset (exposure) variable in his Poisson regression analysis of the FASTRAK ...
5
votes
2answers
275 views

All possible A of Ax=b with constraints on A

I have a linear problem that I want to solve but the method is quite different from normal, the problem is still Ax=b. However, in this instant I have A being unknown, apart from the fact that each ...
0
votes
1answer
69 views

Monte Carlo simulation using modified rejection technique

Plot the probability density function $\qquad w(x)=(1/(1+x^2))(1/x^{0.5})$ for $(0 < x < 1)$ Make up the subroutine flowchart to get the random numbers $x$, using the modified ...
2
votes
4answers
153 views

How to generate a matrix with certain conditions

I want to generate a $n \times n$ matrix. I want the diagonal entries to be all 0 I want a random choice of matrix elements with 0 or 1. The probability of having a 1 as a matrix element is $1/m$ and ...
4
votes
1answer
83 views

Custom color for fence, whisker and outliers in BoxWhiskerChart

How can I use custom color for fence, whisker and outliers. Here is my MWE ...
3
votes
1answer
89 views

Speed up Expectation-Maximization algorithm

I would like to implement the EM algorithm for parameter estimation of a bivariate poisson model from Karlis 2003. The code is able to run, but I'm not very satisfied with the speed. I would like to ...
0
votes
0answers
49 views

Animating Smooth Density Histogram

I have a large data file (~500 MB), which I import as ...
3
votes
2answers
61 views

Two dotted lines for reference distribution in QuantilePlot

I'm using QuantilePlot to assess if my data fits a normal distribution using Mathematica 11.3. My data set is large, 500000 points. A histogram of my data plotted with a normal distribution visually ...
4
votes
1answer
136 views

Smooth Density Histogram with probability areas

As an example, for a normal distribution everyone knows that 68% will fall within one standard deviation away from the center and so on. The following code will give me a 2D Normal distribution and ...
2
votes
2answers
87 views

Derivative of integrated noise Gaussian likelihood

In a Bayesian problem with Gaussian likelihood with mean $\mu$ and a uniform prior on the standard deviation $\sigma$, it is possible to derive the marginal posterior (where $\sigma$ has been ...
0
votes
1answer
76 views

Box Plot of Classified Data

I have three sets of data which are collected in Jan, Feb and Mar respectively. I would like to make a box plot to show the monthly variations. As the data volume is large, I classified the data ...
2
votes
1answer
40 views

Computing the Multivariate Normal density gives sometimes different values from in-built function

I'm trying to define the density of the Multivariate Normal distribution, since it will be faster to compute for greater dimensions (vectors of size 50 or more), specially when I have to do those ...
3
votes
1answer
106 views

Installing R for use with V11.3 on Windows 10

I can't install R on Windows 10. I tried some solutions that I found on the Internet, but they did not help. ...
0
votes
2answers
88 views

Calculating the probability of hitting, Fisher linear discriminant

I have 4 data matrix, which are described two parameters. (M1, M2, M3, M4). So I made transition from base parameters to principal components and displayed them in ...
5
votes
2answers
154 views

How to preserve normalization in NDSolve?

I have a probability density function: $P_{init}(x)=\exp(-(x-x0)^2)/\sqrt{\pi}$. I am trying to use it as the initial condition for the following partial differential equation: ...