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
vote
0answers
68 views

Convolution of an Image with Gaussian sigma = 1

I'm new to image processing and I've been testing out different Gaussian blur filters. Out of curiosity, I generated an object that is a 2D Gaussian with sigma = 1. I convolved this object with a ...
0
votes
1answer
89 views

Mathematica failing to compute function to calculate integral over a region bounded by straight line

Statement of the problem Consider the following situation: You have a model which employs a bivariate distribution with known parameters. You have a random realization from the distribution ...
0
votes
2answers
97 views

How to compute the density of a Inverse Wishart Distribution?

How does one compute the density of the inverse of a Wishart distribution in mathematica? The MultivariateStatistics package only has the Wishart density, and not the inverse Wishart... Any help ...
2
votes
1answer
78 views

Loading MultivariateStatistics` changes colour of some multivariate distributions to red in notebook. Should I be worried?

I need to use the pdf of a Wishart distribution which is only defined in the package MultivariateStatistics`. However, after loading the package, some or all of the ...
1
vote
1answer
72 views

Computing the PDF of a WishartMatrixDistribution. Is this a limitation in the PDF Mathematica function?

I'm trying to compute the pdf of a wishart distribution. Why does PDF[WishartMatrixDistribution[10, IdentityMatrix[4]], 2*IdentityMatrix[4]] not return a ...
2
votes
0answers
43 views

how to derive the conditional covariance matrix of random variables (X1,X2,…,Xn)

It is to my surprise that Mathematica does not have a built-in function to derive a conditional covariance matrix (CCM) for multiple random variables. Since such a ...
4
votes
1answer
63 views

Can this multinomial probability query performance be improved?

I'd like to get the probability that some N samples of M equiprobable events does not have any case of the M possible individual outcomes having more than some maximum value. The code I'm using on ...
0
votes
0answers
51 views

Uniform distribution on the manifold: There exist a build-in solution?

In general, the problem is to generate many random points on the (high-dimensional, compact, smooth) manifold ~~ uniform distribution w.r.t. lebesgue measure. So, this is a common in the Monte-Carlo ...
1
vote
1answer
54 views

Is there any functions to extract the combinations of sets [closed]

Suppose I have a function f which is depending on a,b,c (f[a_,b_,c_]). these a, b, c can take two value zero and infinity. How to have a combination of the function f when it takes zero and infinity ...
6
votes
2answers
508 views

Fitting PDF to two normal distributions

I'm trying to fit this data As you can see there's two peaks. I want to fit this curve with two normal distribution with the same variance but different mean. So far I've got this: ...
1
vote
0answers
77 views

how to derive a conditional covariance matrix (symbolically)

I have searched the database of the questions asked in this forum but to my surprise I could not find any satisfactory answer to my relatively simple question. Given a vector of random variables <...
3
votes
1answer
119 views

Information flow using entropy does not give me an output

Here are few equations to calculate the quantity of information flow (i..e., mutual information): I wrote the following code (a primitive one) to calculate ...
2
votes
2answers
164 views

How do I define and plot a function involving random variable? [closed]

I am struggling to define and and plot the following function: $\qquad \sin(x) + 0.15\,u$ where u is a uniform random variable in the range [-1, 1]. How can I define such a function and then plot ...
0
votes
0answers
51 views

CDF of probability from a ClassifierFunction

I have a classifier function that classifies whether a student is likely to succeed in a course given their score on a placement test. From this, I am pulling both the probability of being successful ...
0
votes
1answer
64 views

Is there a faster way to compute and resuse this pdf?

I'm trying to compute the pdf of a multivariate normal in mathematica. ...
1
vote
1answer
103 views

Finding the optimal probabilty distribution

I am trying to obtain the optimal probability distribution function to the following data. My attempt: ...
5
votes
2answers
97 views

The function which returns the number of occurences per variable

I have got a list of points:data = {{1,2},{1,3},{1,4},{2,1},{2,3},{2,5},{2,6},{2,7}}. And I wanted to plot a function which will be showing the number of points for ...
1
vote
2answers
143 views
0
votes
2answers
75 views

Partitioning Mixture Distribution Dataset into constituent Distributions

Suppose I have a dataset that is derived from a random sampling from a mixture distribution ...
-1
votes
1answer
46 views

Is there a workaround for this Solve and NSolve error?

Using either Solve or NSolve gives the same error: ...
0
votes
0answers
43 views

Simultaneous fitting of polynomial parameters to data [duplicate]

I have two following data-sets: ...
0
votes
0answers
33 views

How to solve when using a Cumulative Binomial Distribution function?

This is probably very simple, but I could not find the answer. How to solve? I tried Reduce as well to no avail. ...
3
votes
3answers
329 views

Speeding up the calculation of a binomial sum

Is it possible to speed up this calculation? A[j_, p_, n_] := Sum[Binomial[n, k] p^k (1 - p)^(n - k), {k, 0, j}] Plot[{A[j, 0.5, 12000]}, {j, 0, 12000}] Thanks!
3
votes
3answers
318 views

How to get median based on probability distribution?

From some calculation, I have a distribution of discrete data $(i,P_i)$ and then want to get the median based on this distribution. Naive way is to create a list ...
0
votes
2answers
88 views

How to speed up this calculation regarding the normal distribution?

This calculation takes a very long time! Why? How can I improve it? Thanks! ...
3
votes
1answer
133 views

SmoothHistogram as “Probability”?

In a previous post, the following answer was given: ...
2
votes
1answer
64 views

Drawing random numbers from TransformedDistribution

Suppose I have created the following TransformedDistribution: ...
0
votes
1answer
79 views

Producing a probability distribution numerically

Given that Mathematica could not produce a symbolic solution to the problem stated here, how can I produce many values of $A$ to then create $B$ numerically? ...
0
votes
2answers
111 views

Is this TransformedDistribution beyond Mathematica?

Creating the following transformed distribution $A$ A = TransformedDistribution[Sqrt[x^2], x \[Distributed] NormalDistribution[\[Mu], \[Sigma]]] and then using A ...
1
vote
1answer
89 views

Study frequency of occurrence of alternatives in a test [closed]

There is a test with 5 alternatives A, B, C, D, E, I need to study the frequency of occurrence of these alternatives in a test of 80 questions, "n" times I can not think of a way to program it, help ...
5
votes
1answer
93 views

Annulus distribution in n dimensions: normalising constant, normed mean and variance

I would like to know the normalising constant of a distribution which has the pdf, $$f(x) \propto \sqrt{\frac{1}{2\pi\sigma^2}}\text{exp}(-\frac{(|x|-r_0)^2}{\sigma^2}),$$ where $x\in\mathbb{R}^d$ ...
1
vote
0answers
33 views

Inverse of Normal Distribution CDF incorrect for large value?

I have a function F which is the CDF of the standard normal distribution. The inverse of F should be infinity at 1. However, I ...
2
votes
1answer
86 views

Possible to draw Boxplot using quartiles only?

Sorry about the informality but I am posting from my phone here. Is it possible to draw/sketch a boxplot only using the values of quartiles? For example, minimum is 1, max is 10 lower quartile is 2 ...
4
votes
1answer
150 views

How can I generate random variates from a from a PDF that I have defined?

My problem is that Pick evaluates all the elements of a list at once. In my code I need a similar function that evaluates each element of a list. I need to ...
7
votes
2answers
345 views

Calculate mean normed distance and normed variance of cone-shaped distribution in N-dimensions

I would like to calculate the mean and variance of the normed distance of a cone-shaped distribution, $f(x) \propto \exp(-|x|)$, where $x\in\mathbb{R}^d$, where $d$ can be any positive integer. In ...
1
vote
1answer
92 views

Distance Correlation

I am interested in calculating the distance correlation between a pair of vectors. To do it I use CorrelationDistance function, but I get a distance greater than 1. ...
1
vote
0answers
66 views

How can a .jmp file (from the statistical software JMP) be imported into Mathematica?

The Wolfram documentation and MSE say nothing about the statistical software JMP or .jmp files. A simple Import["filename.jmp"] or ...
1
vote
2answers
189 views

Select rows of data that satisfies both conditions simultaneously

I'm a new user of Mathematica and now I am confused by a problem. Now I have about 2 million rows of data and 3 columns, i.e. a 2million*3 table. What I am trying to do is select rows of data ...
5
votes
2answers
142 views

Integrating a bivariate distribution over a region bounded by a straight line

Summary of problem: I'm using Mathematica version 8 to try to integrate the bivariate distribution over a region bounded by a straight line. The two random variables are uncorrelated. When I use ...
0
votes
1answer
144 views

Normal distribution plot construction

How would I go about creating a normal distribution graph with standard deviation given by P[x_] = -x*Log2[x] - (1-x)*Log2[1-x] and mean 6? I want to ...
4
votes
2answers
93 views

Expanding Log[Product[…]]

I'm trying to get the log-likelihood of a Gaussian in the form $$ p(\textbf{x}|u,\sigma^2)=\prod_{n=1}^{N}\mathcal{N}(x_n|\mu,\sigma^2) \quad (1) $$ $$ \ln\ p(\textbf{x}|\mu,\sigma^2)=-\frac{1}{2\...
22
votes
3answers
2k views

Efficient way to simulate thousands of Markov chains

I am currently trying to simulate relaxation of a protein population while maintaining the stochastic properties of the system. For this, I used a Markov chain to describe the temporal evolution of ...
0
votes
2answers
198 views

Creating a probability distribution using Piecewise [closed]

The following "Manipulate" shows the behaviour of functions that I hope, if collected according to the rules shown further down, can be transformed into a probability distribution: ...
4
votes
3answers
250 views

Construct Distribution Histogram From Random Variable

Given a Beta Random Variable $X$ with parameters $\alpha, \beta$ and a positive constant $n$, suppose I am interested in the distribution of: $$Y:=\lfloor nX\rfloor$$ Suppose I want a histogram ...
1
vote
1answer
60 views

Scaling and shifting in fitting of a LogNormal distribution from experimental data

I have the following set of data: ...
10
votes
3answers
611 views

Can I use Compile to speed up InverseCDF?

I'm repeatedly issuing the command P = InverseCDF[NormalDistribution[0, 1], T] where T is either a 36- or 64-vector of real numbers (points in the unit ...
15
votes
1answer
409 views

Estimating the probability distribution of a Brownian motion particle

I have system of hypothetical physics. A particle traverses a Brownian motion path in free space, and if it hits a boundary, in my case a box with an opening on one side, it teleports to an uniformly ...
0
votes
1answer
91 views

Minimizing chi-squared to find unknown value of parameters

X= Sum[(events[[i]] - f[x, a, b])^2/ events[[i]], {i, 1, 40}] I want to minimize X to find the value of a and b. How will i do it?
0
votes
1answer
41 views

ProbabilityDistribution fails for square root

I would like to sampling data from a distribution Sqrt[x^2 + y^2]. I used the code as follows: ...
2
votes
1answer
42 views

The distribution of one variable, which is a function of another, random variable

Suppose I have the following equation: a = -(Log[(1 - b)/b]/Log[10]) which is visualized as Suppose further that $b$ is drawn from a uniform distribution with ...