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
21 views

Probability for k events in an arbitrary time step, while no events before

I want to compute the following probability. Assume that we have a Poisson distribution $P(k,t)=\frac{(a(1-s)^t)^k}{k!}exp(-a(1-s)^t$ with mean $a(1-s)^t$. While $0 \le a \le0.5$ and $0\le s \le 1$ ...
1
vote
1answer
82 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 <...
29
votes
1answer
943 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
41 views

Best Way For Estimating Parameters Of Hidden Markov Process

Parameter estimation is not stable. First, make a model. ...
0
votes
3answers
91 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
111 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
49 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
50 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
259 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
40 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
207 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
101 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
40 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
166 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 ...
0
votes
1answer
38 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
50 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
95 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
25 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
46 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
43 views

Density in histogram doesn't show completely

...
2
votes
1answer
61 views

Confusion about Predict Model NameAge

Predict["NameAge", "Claire"] 8 distribution = Predict["NameAge", "Claire", "Distribution"] dataRaw = distribution[[2]] <...
1
vote
1answer
50 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
76 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
119 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
83 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
205 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
2answers
90 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
50 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
39 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
29 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
138 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
50 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
109 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
55 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
96 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
84 views

Symbolic Multivariate Distribution

If I try to input a symbolic multivariate distribution, I do not get a useful result. ...
16
votes
3answers
995 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
40 views

Plotting three related distributions on the same axis

The following solution to this problem was found by @Wolfies: ...
1
vote
2answers
81 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
146 views

TransformedDistribution with Conditioned

Is the following attempt beyond Mathematica 11? ...
2
votes
1answer
44 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
82 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
101 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 ...