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.

1,282 questions
Filter by
Sorted by
Tagged with
36 views

Set Theory Question

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 ...
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 ...
33 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 ...
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? ...
26 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 ...
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)....
53 views

RandomVariate drawn from a custom distribution function takes forever to finish

I'm using the following custom-defined PDF: ...
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$: ...
64 views

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 ...
217 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: <...
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: ...
138 views

Assign Error bars for y-intercept

I have some data (x,y) with error bars in y direction: ...
77 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 ...
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: ...
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: ...
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, ...
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 <...
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 ...
42 views

Best Way For Estimating Parameters Of Hidden Markov Process

Parameter estimation is not stable. First, make a model. ...
96 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: <...
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 ...
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: ...
64 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 ...
279 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, & \...
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 ...
45 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: <...
265 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. ...
112 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 ...
43 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...
167 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 ...
39 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 ...
52 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: ...
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 ...
27 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. <...