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
6
votes
1answer
361 views

Why is my read in of data taking so long?

I'm just trying to read in some data before I do some calculations. The data set is over 200,000 values that look like this: Here is the code I am using: ...
0
votes
1answer
115 views

How to fit data with superposition of CDFs?

With the help of @JimB, I could fit some experimental data with a CDF using NonLinearFitModel. The set of data is the following: ...
6
votes
3answers
190 views

Symbolic integration of logmultinormal distribution

I have been trying to integrate and compute moments of LogMultinormalDistributionin Mathematica, but the integrals don't seem to evaluate. Say for the first moment, ...
1
vote
1answer
96 views

TransformedDistribution doesn't seems to work properly in this case

Im trying to get the distribution of the random variable defined by $$Y_n:=\left|\sum_{k=1}^n e^{ i X_k}\right|$$ for arbitrary $n$, where $X_k\sim U[0,2\pi]$ i.i.d. Then I had written the code <...
38
votes
1answer
2k views

How to fit a linear model in the Bayesian way in Mathematica?

Basically, I'm looking for the Bayesian equivalent of LinearModelFit. As of the moment of writing, Mathematica has no real (documented) built-in functionality for ...
1
vote
0answers
53 views

Best Way For Estimating Parameters Of Hidden Markov Process

Parameter estimation is not stable. First, make a model. ...
0
votes
3answers
179 views

How can I calculate the expected value of the sum of “n” i.i.d. variables with any distribution?

Particulary, I would like to find the expected value of the sum of $n$ variables distributed like ParetoDistribution[1,1.14]. For example, this works for the sum of two vars with Gamma distribution: <...
5
votes
2answers
173 views

How to find the shape parameters of of a beta distribution given the position of two quantiles?

How to find the shape parameters of of a beta distribution given the position of two quantiles? I am trying to find $\alpha$ and $\beta$ the shape parameters of a beta distribution. I know that my ...
2
votes
2answers
136 views

How to define a discrete distribution with non-integer sample space elements (outcomes)?

How to define a discrete distribution with non-integer states (sample space elements)? I know how to define a discrete distribution with integer states: ...
0
votes
2answers
138 views

FindDistributionParamters vs. NonlinearModelFit for NormalDistribution

I have the following data: dat["Sag"] ={1.277, 1.913, 1.48, 1.472, 1.787, 1.736, 1.896, 1.715, 1.131} I want to fit a normal Distribution to it and get the ...
3
votes
4answers
377 views

How to calculate a conditional PDF in mathematica?

What is an elegant way of calculating this result (programmatically) in mathematica? Let $X$ be a random variable with PDF $$f_{X}(x) = \begin{cases} x/4, & \text{if $1<x\leq3$} \\ 0, & \...
13
votes
3answers
1k views

Can Mathematica find an expression for the distribution of the median of N i.i.d. random variables?

I posted this question on Math, but there has been silence there since. So, I wonder if anyone here can get any closer to the answer to my question using Mathematica. Here is the question: Suppose I ...
2
votes
1answer
49 views

Trouble with gambling function

I am trying to make a function which gives us a 1/7 chance of doubling up, or a 6/7 chance of losing $20. Each time the function runs should be an independent event. I have modeled it as follows: <...
8
votes
2answers
840 views

Pairwise Scatter Plots with Histograms and Correlations

Has anybody written a function which can scatter plot data with histograms and correlations? Here is an example form MATLAB. This is related but does not print correlations. R has a similar function. ...
4
votes
1answer
128 views

Non-flat partitions of a set

A non-flat partition of a set is one where, when the elements of the set are on a grid, the partition does not contain subsets with elements from the same row. When the set is more irregular the same ...
1
vote
2answers
56 views

Question About Sampling from Conditional Distribution Created from Approximated Distribution

First, set the data and prepare the conditional distribution. pxy is joint distribution of Random Variable x and...
3
votes
2answers
225 views

On Certain Characteristic Function

I am trying to find the characteristic function for Johnson's SU distribution by integrating the probability density function with Exp[I*t*x] but Mathematica is ...
1
vote
3answers
128 views

Automatic Manipulation of experimental data and plotting

I have experimental data which looks like this In the high positive and negative x-axis regions, my data is always linear, I want to extract the slope of data in these regions, take average and ...
0
votes
1answer
57 views

How to obtain the correct interpolation for the following data?

I have a dataset DistrTemp.dat. It represents a set of data in the form {{x,y,z,f[x,y,z]}}. Here, x defines a system, while ...
2
votes
1answer
62 views

How to write down a probabilistic function in Wolfram Language?

How does one write a Wolfram function which has a 25% chance of returning 1, a 50% chance of returning 2, and a 25% chance of returning 3? Here is how the data structure might look like: ...
4
votes
1answer
252 views

Structural Breaks in a Time Series Model

The Chow test is a test of whether the true coefficients in two linear regressions on different data sets are equal. In econometrics, Chow test is most commonly used in time series analysis to test ...
1
vote
1answer
43 views

How to optimize bin counts with weighted data using multiple lists?

I am trying to sort elements in multiple lists into buckets with weighted data. I can do the single-list case based on a previous question. Specifically, the code under Update in the first answer. <...
0
votes
0answers
67 views

Plotting correlation between two metrics that contain hundreds of thousands of data points

I wanted some feedback on what is thought of as best practice in terms of showing correlation between two metrics in terms of minutes vs minutes when both metrics contain a large amount of data points ...
1
vote
2answers
51 views

Density in histogram doesn't show completely

...
2
votes
1answer
71 views

Confusion about Predict Model NameAge

Predict["NameAge", "Claire"] 8 distribution = Predict["NameAge", "Claire", "Distribution"] dataRaw = distribution[[2]] <...
1
vote
1answer
170 views

Sampling Standard Deviation

Here I found a formula for the sample standard deviation: http://mathworld.wolfram.com/StandardDeviationDistribution.html Here is my simulation: ...
1
vote
1answer
100 views

RandomVariate sometimes fails for a custom distribution

From the following custom probability density function: fhm[X_, Ao_, x_] := (X/Ao^X) x^(X - 1); I want to get a random variable of $10^6$ points of values. So i ...
2
votes
1answer
262 views

Monte Carlo Simulation of a Double Well Potential (Edited)

I am looking for a possible way to simulate the temperature effect on a collection of atoms sitting within a double well potential, say something like ...
6
votes
1answer
91 views

Why is SmoothKernelDistribution not symmetric in 2D?

For example, we create SmoothKernelDistribution from one data point in 2D, e.g. {0,0}. Why is the plot of ...
4
votes
1answer
240 views

Inconsistent simple simulation outcomes?

Bug introduced in 10.4 or earlier and persisting through 12.0.0 or later Two simple kinds of simulating the one-sided exact Fisher-test of obtaining at least 86 successes in 129 draws in a ...
4
votes
3answers
361 views

Constant Distribution

As far as I know, Mathematica lacks a definition for a probability distribution representing a constant random variable. Is this assertion correct? Is there a problem in making such a distribution ...
1
vote
1answer
143 views

Problems with CDF and Distribution Fit Test

I am trying to compare various PDFs for goodness of fit using 100,000 points of simulated data. I use some of Mathematica's built-in PDFs but I also need to generate my own. I have run into a couple ...
1
vote
0answers
45 views

Exponential distribution and numerical errors?

I am working on the measure of a Curie Weiss model over a lattice $$ \mu[m] = \frac{e^{\beta N (hm + m^2)}}{\sum_z e^{\beta N (hz + z^2)}}\binom{N}{\frac{(1-m)N}{2}}2^{-N} $$ where $m\in\{-1,-1+2/N,\...
0
votes
0answers
50 views

Simulation runs only for smaller number of iterations

The following code does not run for larger number of iterations . It runs for n=5 ,10 etc. but does not run for n=50 or greater. I tried to limit the accuracy goal and precision goal in '...
0
votes
1answer
48 views

Inverse stochastic problem solution

I am trying to determine a probability density $p(\mu)$ such that, when $\mu$ is inputted into a forward simulation equation: $d \sim \mathcal{N}(\mu,0.1)$, I obtain a distribution on $d\sim \mathcal{...
1
vote
1answer
197 views

Create a Venn diagram showing the relations of three sets of quantum states [closed]

I've determined a number of probabilities pertaining to three subsets of the "magic simplex" of quantum states described in https://arxiv.org/abs/1212.5046, and certainly would like to have a ...
1
vote
1answer
75 views

How to generate LogNormalDistributions with mean=10, spanning one order of magnitude?

I'm a beginner with WM. I actually want to generate two non-overlapping LogNormalDistributions spanning an order of magnetitue with respect means $x = 1$ and $x = ...
1
vote
0answers
115 views

RandomVariate with ProbabilityDistribution performs well in 10.0, but not in later versions

I have a custom probability distribution function and I want to generate numbers according to this PDF. Interestingly enough, this works without trouble on my MacBook with Mathematica 10.0, but when I ...
0
votes
0answers
77 views

Can Mathematica be used to fit these functions related to the Riemann Xi function $\xi(s)$ to a known probability distribution type?

This question is related to my Math Stack Exchange question at the following link: Question on Probability Distributions Related to the Riemann Xi Function $\xi(s)$ The definitions below are for $x&...
2
votes
3answers
109 views

Average of samples in a period of time

I take samples in an experiment which results low (around 0) and high (around 60) values. In many of the tests, there are more high values at the end of the experiment than at the beginning. The time ...
2
votes
1answer
98 views

Symbolic Multivariate Distribution

If I try to input a symbolic multivariate distribution, I do not get a useful result. ...
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
52 views

Plotting three related distributions on the same axis

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

Computing the Expectation

The following solution to this problem was found by @Wolfies: ...
2
votes
1answer
83 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
79 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
169 views

TransformedDistribution with Conditioned

Is the following attempt beyond Mathematica 11? ...
2
votes
1answer
66 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 ...
2
votes
1answer
173 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
126 views

Fit Markov Chain

Assume a simple Markov Chain with the transition matrix ...

1
5 6
7
8 9
32