The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
-1
votes
0answers
28 views

Prove that of two discrete random variables X and Y are independent [on hold]

Prove that of two discrete random variables X and Y are independent, then H(X|Y) = H(X).
0
votes
0answers
35 views

How can we calculate the probability for different events [on hold]

For example, You send out three messages for help: a smoke signal that has probability 0.1 of being seen a message in a bottle that has probability 0.2 of being found a carrier pigeon that has ...
0
votes
0answers
23 views

Compute entropy of the following random variables

Compute entropy of the following random variables: the random variable X that takes the values 0, 1, with probability 1/2.
-3
votes
0answers
66 views

Set Theory Question [on hold]

Q: Sum 40 balls in a box, 8= Blue, 13= Black, remaining= grey, I pick 5 balls randomly, pick another then put 1 back, pick another then put 1 back, i. Then return a ball & pick another ...
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
34 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? ...
10
votes
2answers
1k views

How to implement Kullback-Leibler divergence using Mathematica's probability and distribution functions?

Last year Jens answered a question about how to implement Kullback-Leibler divergence in the discrete case. He gave this answer: ...
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 ...
7
votes
2answers
448 views

A summary command for statistics

In R I can do: summary(data) Which gives the min, max, median, first, and third quartiles. Is there a similar single command in Mathematica for this? I know I ...
5
votes
1answer
76 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)....
34
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 ...
4
votes
2answers
53 views

RandomVariate drawn from a custom distribution function takes forever to finish

I'm using the following custom-defined PDF: ...
0
votes
1answer
64 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(\...
1
vote
0answers
30 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$: ...
2
votes
0answers
91 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
27 views

Covariance of TimeSeries in v10.0-10.3

The following works in v11.2-12.0: ...
4
votes
2answers
82 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-...
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: ...
2
votes
3answers
148 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
27 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
90 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
1answer
62 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: ...
3
votes
3answers
170 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 ...
2
votes
1answer
225 views

Standard error of a nonlinear fit

I would like to better understand the process that Mathematica uses to determine the standard error when fitting with NonlinearModelFit. I have been reading this ...
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$-...
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
77 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}}...
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. ...
11
votes
1answer
447 views
1
vote
1answer
710 views

Integration of linked PDFs over probability simplex

I'm trying to integrate the following expression: f[a1,p1+p2+p3+p4]*f[a2,p2+p3+p4]*f[a3,p3+p4]*f[a4,p4] Where ...
4
votes
3answers
218 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
77 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: ...
2
votes
2answers
62 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 ...
5
votes
1answer
139 views

Assign Error bars for y-intercept

I have some data (x,y) with error bars in y direction: ...
4
votes
1answer
131 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 ...
0
votes
1answer
79 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
3answers
113 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, ...
6
votes
1answer
348 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: ...
2
votes
1answer
86 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 ...
1
vote
1answer
86 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 <...
9
votes
2answers
3k views

How to set up a simple Monte Carlo simulation?

there is a 1% chance that there will be a scattering event, if there is a scattering event the direction of scattering will be determined by a random sample of the custom[a_] function and if there is ...
12
votes
3answers
674 views

Is there a package for Bayesian Linear Regression?

Is there a Mathematica package for Bayesian linear regression? Thanks
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
97 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
116 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
64 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: ...