We’re rewarding the question askers & reputations are being recalculated! Read more.

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
1answer
52 views

SmoothHistrogram plot is not smooth [on hold]

I used the following code to show a small hump near 5000. With R it's fine but for some reason Mathematica draws strange vertical lines. I tried several combinations of ranges. (Data from here or here....
0
votes
0answers
28 views

How can I derive a scatter plot from histogram data?

This is the code that generates the histogram. ...
0
votes
1answer
60 views

Generating random numbers from specified distribution under a constraint

I need to generate 500 numbers from a distribution specified. I used the well-known CDF method, but since I'm new to Mathematica, I don't know how to set a condition on the sum of these variables. <...
0
votes
0answers
8 views

KL divergence of two independent variables [migrated]

I'm missing something obviously this is the way to start this: $\sum_{x\in X}^{}p(x)log(p(x)) - \sum_{x\in X}^{}p(x)log(q(x))$ how to continue from here? It looks intuitive that if the variables ...
2
votes
1answer
86 views

Conditional expectation

Suppose I have a bivariate normal random vector $(Y,Z)'$ where $Y\sim N(μ1,\sigma_1^2)$, $Z\sim N(μ2,\sigma_2^2)$, and $Cov[Y,Z]=\sigma_{12}$. If I want Mathematica to compute the conditional ...
0
votes
1answer
60 views

Non linear fit data

I am trying to fit this data with this two models. In the first one, the solution is too far from the exact values. In the second one, there is an error. Could you please help? ...
-3
votes
0answers
37 views

Mathematics Statistic Question [closed]

At an examination, students can select three subjects out of many subjects. The following information is given on the subjects STATS and IT and MATHS. 45% of all students take MATHS 20% take IT and ...
-1
votes
1answer
39 views

Single toss of two dice [closed]

Does any one knows answer for this question related to probability? A pair of fair dice is tossed once. If the sum of the two numbers is greater than 9, the probability that one of the numbers is a ...
1
vote
2answers
48 views

How do you calculate the expected value of the sum of random variables?

For instance, when trying to compute $\mathbb{E}[\sum_{i=1}^{10}X_i]$ where $X_i \sim N(0,1)$, I input into Mathematica: ...
5
votes
3answers
131 views

Moments of Multinormal in symbolic form

Gaussian expectations often simplify (20.5 of Seber's "A Matrix Handbook for Statisticians" gives many examples). I'm wondering if there's a way to use Mathematica to produce the formulas semi-...
1
vote
1answer
84 views

How can I generate a histogram for the largest strongly connected component of a directed graph?

With the help of several persons from this forum, I have written the following MMA Code using Manipulate to describe certain ...
1
vote
2answers
72 views

Is there an issue with the correlation function?

I am trying to find the correlation between Uniform R.V.s using the Correlation command in mathematica, but it seems that either I am implementing it wrong or the software cannot find the answer. My ...
0
votes
1answer
41 views

How would one 3d plot the CDF of a probability mass function in Mathematica?

I have attempted to plot the Cumulative Distribution Function of a simple piecewise probability mass function, but the code: ...
1
vote
1answer
32 views

Weird behavior of `Quantile` function

I found a very strange behavior of Quantile function when evaluating the following expression: ...
2
votes
0answers
19 views

FindDistribution generated errors on specific values

...
2
votes
0answers
39 views

How can I generate a Poisson gap sampled list?

tstart = 0; tend = 3; num = 1024; tstep = (tend - tstart)/(num - 1); list = Table[i, {i, tstart, tend, tstep}] // N; Histogram[list] I have a list of 1024 points ...
0
votes
0answers
35 views

probability of one sum greater than another sum [migrated]

There are two group of competitors, say, group A and group B. the members in group A are denoted as a1, a2, …, ai,.., aN; The members in group B are denoted as b1, b2, …, bi, …bN. Each member in ...
0
votes
1answer
30 views

Expression with Boole

Let us have an expression for example, this: 2 (-1 + p) (3 - 4 p + 2 p^2) Boole[\[FormalX] == 1] - 9 (1 - 2 p + p^2) Boole[\[FormalX] == 2] ... For the whole ...
0
votes
0answers
39 views

One Function of Two Random Variable

I wonder how to implement below derivation in wolfram mathematica. I want to see integrate results like below picture. Can you help. I used "TransformedDistribution" but it shows only distribution ...
0
votes
0answers
27 views

Are these TransformedDistributions identical?

If A1 and A2 are independent random variables, and B1 and B2 are as well, then are the following TransformedDistributions the same? ...
0
votes
0answers
27 views

Need help with plotting a probability distribution

I looked through the Mathematica directory and could not find a solution that is right for me. I already solved the mathematics behind this problem, I just need to visualize it in a plot. I am ...
5
votes
1answer
78 views

Speeding up Probability using Monte Carlo

I have a recipe for generating custom distributions, which I want to use Probability[...] on, but am finding that with more than a few variables it very quickly becomes intractable (it runs for hours)....
4
votes
2answers
56 views

RandomVariate drawn from a custom distribution function takes forever to finish

I'm using the following custom-defined PDF: ...
1
vote
0answers
31 views

Moment-generating function of the log-normal distribution. A question about integration

Consider the probability density function $f(x)$ of the log-normal distribution with parameters $-0.1$ and $0.01$: ...
0
votes
1answer
66 views

How to find de Mean and Variance of a defined distribution

I would like to find the Mean and Variance expressions for a Poisson-Lognormal Distribution $$f(x;\mu,\sigma)=\frac{1}{x!\sigma\sqrt{2\pi}}\int_{0}^{\infty}\lambda^{x-1} e^{-\lambda} e^{\frac{(log(\...
2
votes
0answers
93 views

Is Mathematica computing the conditional expectation correctly?

Given a simple case of say 2 independent trials each with probability of success 1/3. Consider a random variable that is gives the 3 times the total successes. We can define this random variable in ...
1
vote
0answers
29 views

Covariance of TimeSeries in v10.0-10.3

The following works in v11.2-12.0: ...
1
vote
1answer
21 views

How to view data labels corresponding to cluster points when using FindClusters and Tooltip?

I go straight to the subject; I have the following data set: ...
5
votes
2answers
90 views

What is the distribution of a random variable with pdf proportional to the product of two normal pdf's

I'm working my way through a nice e-book on Kalman filters, translating to Mathematica as I go and I've hit an interesting problem. In this section: https://nbviewer.jupyter.org/github/rlabbe/Kalman-...
2
votes
3answers
158 views

Expected value of a lognormal distribution

I wonder why I couldn't compute the expected value of this function: ExpectedValue[b*x*(1 + ω*x^ρ)^κ, LogNormalDistribution[μ, σ], x]
0
votes
0answers
32 views

Expectation operator expression does not permit distribution parameters

It appears that the Expectation operator doesn't allow the presence of distribution parameters. Defining the Expectation operator...
2
votes
1answer
28 views

Find the Kernel distribution over an already known histogram

I have an estimated distribution over a parameter, however, the distribution is not continuous, and InterpolatingPolynomial cannot estimate my distribution good ...
7
votes
2answers
93 views

Visualizing a Probability Space in Wolfram w/Two Events?

For two events say $A$ and $B$, and supposing we have the data: $P(A)$, $P(B)$, $P(A|B)$ and $P(B|A)$, is there a way to generate something like a "probability venn diagram" from this information? The ...
0
votes
0answers
11 views

Expectation of (functions of) squared $\ell_2$ norms of Gaussian vectors

I want to compute (symbolically, keeping the dimension $d$ as a variable) some expressions of the form $\mathbb{E}[P(\|X\|_2^2,\|Y\|_2^2,\|X+Y\|_2^2)]$, where $X,Y$ are independent standard $d$-...
3
votes
3answers
181 views

How to plot a Histogram and compare with a particular probability density function PDF

I would like to know how to plot a make a comparison between a histogram and a set of random data, I have the following probability density function (PDF) which is given for this problem. I can ...
1
vote
2answers
37 views

Generating random variates inside summation

I'd like to generate a table of sums which each a non-correlated, normally distributed random variate inside. Here is the sample code: ...
1
vote
1answer
75 views

Expectations of sums

I would like to use Mathematica to derive some bounds on empirical estimators, such as $E[Y]$ where $Y = \tfrac1n\sum_{i=1}^n (X_i - X)^2$ and $X = \tfrac1n\sum_{i=1}^n X_i$. For a moment I thought ...
2
votes
1answer
81 views

Creating a user defined PDF

I have a derived distribution which I want to play with, which is of the form $$\frac{1}{\sigma^{2}}2^{-2+\frac{x}{10}} 5^{-1+\frac{x}{10}} e^{-\frac{1}{\sigma^{2}} 2^{-1+\frac{x}{10}} 5^{\frac{x}{10}}...
2
votes
2answers
65 views

TransformedDistribution

I am trying to perform some calculations on a random variable that is the sum of a normal distribution and a truncated normal distribution. My understanding is that using ...
4
votes
3answers
227 views

conditional probability of dependent random variables

Suppose I have 3 random variables: $$X \sim \mbox{Bernoulli}(1/2)$$ $$Z \sim \mbox{Normal}(0,1)$$ $$Y = X+Z$$ How do I compute the conditional probability density: $$P(X=1 | Y=y)$$ Attempt1: <...
2
votes
2answers
85 views

Idiomatic way to obtain conditional density function from a continuous joint distribution

Context In Mathematica one is able to directly calculate the marginal and conditional probability distributions of a discrete joint distribution (abstracting over the specific details) like so: ...
5
votes
1answer
143 views

Assign Error bars for y-intercept

I have some data (x,y) with error bars in y direction: ...
0
votes
1answer
104 views

Obtain reduced chi-squared for fit

Dear Colleagues, I have performed a fit according to the code below. The last step is to obtain the value for the reduced chi-squared for the goodness of fit. Does mathematica have a ...
6
votes
1answer
349 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
63 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
125 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
87 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 <...
35
votes
1answer
1k 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
42 views

Best Way For Estimating Parameters Of Hidden Markov Process

Parameter estimation is not stable. First, make a model. ...
0
votes
3answers
100 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: <...