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
0
votes
0answers
30 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
94 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
49 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
88 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 ...
2
votes
0answers
70 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
44 views

Expectation of two independent random variables

I would like to compute the following function of two independent random variables: ...
5
votes
3answers
143 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
76 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
301 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
86 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
65 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
100 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
189 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
119 views

Renaming one parameter changes the result of Simplify

Surely the following couple of expressions should both output True: ...
4
votes
2answers
255 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
68 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
199 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
71 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
79 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
77 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
67 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
276 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
77 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
160 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
87 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
108 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
54 views

Animating Smooth Density Histogram

I have a large data file (~500 MB), which I import as ...
3
votes
2answers
65 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
162 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
92 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
84 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
42 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
121 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
92 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
176 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: ...
3
votes
1answer
38 views

How to put ChartLabel of BoxWhisker top of the frame?

I would like to put chartlabel above the frame (highlited place). Any idea? ...
1
vote
2answers
151 views

How to evaluate the integral $\displaystyle\int_0^\infty(\sigma^2)^{n/2+1}e^{-a/\sigma^2}d\sigma^2$? [closed]

I want to evaluate this integral: $\qquad \displaystyle\int_0^\infty(\sigma^2)^{n/2+1}e^{-a/\sigma^2}d\sigma^2$ Mathematica produces the following error message: Invalid integration variable or ...
3
votes
3answers
107 views

Looking for other integer lists with the same length, quartiles, mean, min, max, and standard deviation

I want to find at least one set, namely B with the same length, quartiles, mean, min, max, standard deviation as A. I have tried ...
2
votes
1answer
76 views

Label quartile / quantile data

I searched for a WL implementation of the Python Pandas qcut function but could not find one. Anyone aware of an implementation? For the moment I just need quartiles and the assignment of values in ...
1
vote
1answer
59 views

Issues computing expectation

I am interested in computing a conditional expectation, but not sure what is the best way to do it. All the methods I have used seem to have issues. Let $Y=X_1+X_2$ where $X_1$ and $X_2$ are ...
-1
votes
1answer
72 views

Conditional expectation using derived distribution [closed]

While this question can be solved using some (hand) analysis and standard calculus, I would have thought that the following code would have worked: ...
0
votes
1answer
71 views

Double Integral to compute conditional expectation

Let $V=X+Y$ where $X$ and $Y$ are independent random variables, both normally distributed with $\mu=0$ and $\sigma=1$. I am interested in computing $E[X \mid V\geq c]$ where $c$ is an arbitrary ...
19
votes
5answers
1k views

Sisyphus Random Walk

A Sisyphus Random Walk evolves as follows: With probability (r) you advance the position of the walker by +1. With probability (1-r) the walker resets at x0 = 0. To simulate the probability of reset ...
0
votes
2answers
61 views

How to define mixtures of random variables? [closed]

I am confused by the behavior of MixtureDistribution, even though that sounds like what I would need. Let's say I want to get a parametric solution for the ...
3
votes
1answer
104 views

Problem with the Inverse CDF of Non-central F Ratio Distribution

In[3]:= n = 5; n1 = 4; n2 = 6; γ = 0.05; α = 1/370; InverseCDF[NoncentralFRatioDistribution[1, n1 - 1, n1/γ^2], 1 - α - (n - n1)/n2] During evaluation of In[3]...
3
votes
2answers
212 views

Why does the function VarianceMLE give a different result from Variance?

Why does the function VarianceMLE give a different result from Variance? And what is it in Mathematica 11.3? Please see the ...