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
4
votes
1answer
170 views

Probability that one random variable is greater than another

Suppose I have two random variables: Control = BetaDistribution[24,141] Var = BetaDistribution[30,151] I can sample from this easy enough with ...
5
votes
1answer
98 views

What is the default binning method of Histogram[]?

Histogram[] command returns a histogram of a set of data. There are different methods of binning, such as, Scott's rule, which we can specify the binning method in Mathematica. My question is what is ...
1
vote
1answer
95 views

2D kernel density estimation (SmoothKernelDistribution) with bandwidth estimation: what are the values that Mathematica chooses?

Mathematica has built in bandwidth estimation including the rules Scott, SheatherJones and ...
1
vote
2answers
168 views

FindDistribution doesn't return a decent result

I have the following data set: ...
1
vote
1answer
49 views

Are there any issues/best practices/suggestions when working with a DataDistribution instead of a distribution?

Suppose there is a random variable $X$ that can take on values $-1,0,1$, with probabilities $P(X=1)=P(X=-1)=.25$ and $P(X=0)=.5$. How can I work with such a random variable in mathematica? (Find the ...
0
votes
0answers
60 views

CDF of a learned distribution doesn't evaluate

In this simple example ...
1
vote
1answer
63 views

Appropriate syntax for constructing frequency table and histogram from experiment with three or more dice?

if I say to input 3, how do I get MMA to make me a table with all the cases on the left, in the center their frequency and on the right a histogram,bar chart, or some other way to represent the above. ...
0
votes
0answers
45 views

I have found out CDFs of 2 data and listed them. I need to find out the composition of such 2 CDFs

x= RandomVariate[ExponentialDistribution[2], 10] y = RandomVariate[ExponentialDistribution[3], 10] f = EmpiricalDistribution[x] ...
1
vote
2answers
154 views

Any suggestions for improving my fitting?

This is not a completely Mathematica question, but I hope people who are familiar both with Mathematica and statistics could help me on this. I have a set of data as ...
0
votes
1answer
91 views

Estimating parameters of a custom or constrained distribution

I am trying to estimate the parameters of a custom distribution (an approximation of the skew normal), but I can't get Mathematica to use DistributionFitTest, EstimatedDistribution, or ...
1
vote
0answers
53 views

Fixed-Effects Model in Mathematica

I need to fit a model with fixed effects (country and time) to adress the multivariate relation between a dependent variable for 22 countries over 8 years and two independents with the same dimensions....
1
vote
0answers
203 views

Fokker-Planck equation [closed]

Is there any package for simulation of Fokker-Planck equation in Mathematica? Or, in general for stochastic differential equations?
1
vote
1answer
32 views

Proper probability distribution formatting for DistributionFitTest

I am trying to use an exponentially modified gaussian to fit a distribution, but I think I may be misunderstanding something about how probability distributions work in Mathematica. Running ...
1
vote
0answers
26 views

Is ChiSquarePValue from Hypothesis testing package incorrect? [closed]

Needs["HypothesisTesting`"]; ChiSquarePValue[2/10, 1] gives OneSidedPValue -> 0.345279 whereas ...
8
votes
1answer
271 views

Can LearnDistribution learn conditionality?

I would like to apply LearnDistribution to multivariate conditional distributions. Here's a simple artificial example: ...
10
votes
2answers
435 views

Bug in density function

Executing ...
1
vote
0answers
49 views

Implementing approximatePDF function

Sometimes distribution is too complicated for built-in PDF command, so it would be useful to have approximatePDF[dist,x,n] which ...
0
votes
0answers
97 views

How to implement statistics for the length of continued fractions of a result on MATHEMATICA

After successfully generating the reduced fraction of two coprime in interval (0,1] with the following; ...
4
votes
4answers
566 views

Symbolic Regression

7+ years ago I posted a question here regarding symbolic regression in Mathematica. At that time there did not seem to be much built-in support for this. I'm interested in multi-input models of the ...
1
vote
0answers
48 views

Mixture of density functions

Can Mathematica select the appropriate number of terms when fitting a density function with a mixture of density functions? If so, can it also select the most suitable distributions involved in the ...
0
votes
1answer
62 views

Calculating the Conditional Probability from 3 Distributions

I'm not sure if there is a gap in my stats knowledge or Mathematica knowledge but it's time to ask for help. I have the following system I am trying to calculate the condition probability of getting ...
0
votes
2answers
41 views

Weird behavior of computing sum of two random variables using TransformedDistribution

I want to calculate the p.d.f of two discrete random variables. However, when I made a toy example that random variable was dist and I wanted to find p.d.f. of <...
2
votes
2answers
106 views

Transformation of random variable

I am looking to recreate a derivation of a PDF using a transform of random variables. I did the original derivation in Mathematica with the Mathstatica package, but when I updated Mathematica recently ...
1
vote
1answer
26 views

Ratio involving CDF and PDF of a standard normal random variable behaves unexpected when plotted

Good morning, I am plotting the function $h[x]$, see below, and obtain an oscillating behavior in the range $x \in [7.2,8.3]$ that cannot be explained by the function itself. Also for $x \ge 8.4$ it ...
0
votes
0answers
20 views

NArgMin "function value is not a number" error

The "function value is not a number" type error seems fairly common. Forgive me, but I can't seem to fix my issue using some of the other posts on this site. I'm working on a problem where I ...
0
votes
0answers
137 views

How can I speed up this pdf path integration calculation with a slow recursive function with 40^4 summed terms in each iteration?

I am writing a path integration code for a numerical approximation to a probability density function. I essentially take some initial continuous probability density function p0 and then perform a ...
4
votes
1answer
152 views

How can I speed up this Monte Carlo integration for the Stieltjes constant $\gamma_n$?

Pre-requisite Definition Stieltjes constants ($\gamma_n$) are the constants that occur in the Laurent series expansion of the Riemann zeta function. $${\displaystyle \zeta (s)={\frac {1}{s-1}}+\sum _{...
4
votes
1answer
73 views

How to make a bar graph like this?

I've read some article recently and because I've been doing the same calculations so far, I wanted to have a graph like this: by the looks of it, it certainly looks like it was done in mathematica, ...
1
vote
1answer
69 views

Sample discrete distributions with a good range of observed entropies

For a numerical sanity check, I need to sample random sequences of $n$ positive numbers adding up to 1, and having a high chance of observing both high entropy and low entropy sequences. Compute the ...
4
votes
2answers
140 views

How to throw $n$ random noodles of equal length?

I've been meaning to modify some code given in the the Region Disjoint documentation for the Buffon's Needle problem to instead model Buffon's Noodle Problem. In Buffon's Needle problem you randomly ...
1
vote
0answers
68 views

Bayesian Inference

I am using bSolve which is worked out at this link Using a simple, single condition, example I get the same result with either bSolve or a decision tree Then, using ...
2
votes
1answer
82 views

How to generate random variate in custom domain for a distribution?

I have a distribution defined in a particular domain of the variable but now I want to generate a random variable not in the entire domain but only in a subset of the domain. Here is what I'm trying ...
0
votes
0answers
37 views

Using a matrix as input in KarhunenLoeveDecomposition

I have a matrix which contains realizations of a random variable. I want to perform the Karhunen-Loève decomposition over it. I also have a Matlab code with KL implemented. I have tried to do it as <...
0
votes
0answers
26 views

PredictionLimits not working for time series

I'm doing an ARIMA forecast with daily data (but that is formatted as year-month-day-hour-minute-second, although hour, minute, and second are always zero) and I'm trying to get the prediction ...
1
vote
0answers
56 views

Stochastic noise with known propability density function

How can I generate samples for random function, which functional "probability density" is known? When I say "probability density" for random function $\xi(\mathbf{q},t)$, I mean, ...
0
votes
0answers
75 views

How to find the appropriate fit?

Imagine we are given this set of data: data = {{0, 1}, {1, 0}, {3, 2}, {5, 4}, {6, 4}, {7, 5}}; We fit the data with: ...
-1
votes
1answer
92 views

Compute the likelihood from pdf : $L= \prod^{n}_{i} p(x_{i})$

I would like to use the product value in order to derive the likelihood. Say we have a Gaussian pdf $p(x_{i})$ for $\{i\}_{i=1}^{n}$ and define the likelihood as $L= \prod^{n}_{i} p(x_{i})$. Example 1:...
4
votes
6answers
227 views

How can we use TransformedDistribution to infer the sampling distribution of the sample mean?

As we know, TransformedDistribution can infer a distribution of a transformation like TransformedDistribution[A*X + B, X \[Distributed] NormalDistribution[μ, σ]] ...
2
votes
1answer
54 views

Unknown statistical function - groupings of permutations

Please bear with the vagueness of this question's title, as my question itself has to deal with the fact that I don't know what to call the operation I'm looking for. I have a statistical operation ...
3
votes
0answers
61 views

Adding a new statisitical distribution

What would I need to define to add a new statistical distribution to Mathematica? Ideally, it would support as many of Mathematica's statistical functions as possible. In practice, this might most ...
1
vote
1answer
47 views

Nominal variables in LinearModelFit must be specified before continuous variables

I am applying the LinearModelFit to a 90 x 5 matrix, in which the 4th variable is a nominal variable (i.e., x4 is a categorical ...
0
votes
0answers
34 views

How to calculate smoothing constant alpha in ExponentialMovingAverage?

I'm trying to use ExponentialMovingAverage on a time series, but I'm not sure how I'm supposed to calculate the smoothing constant. I read that the appropriate ...
0
votes
1answer
36 views

Simulating jump Markov process

I am trying to simulate a jump Markov process as follows. I define the process $N_j = N_{j-1} + 1$ with probability 1/2 or $N_j = N_{j-1} - 1$ with probability $1/2,$ with $N_j = 0$ as an absorbing ...
0
votes
0answers
40 views

Calculating correlational dimension using Mathematica

I am modelling such a system: $T:(x,y)\rightarrow (d+C_2(x\cos\tau - y\sin\tau),C_2(x\sin\tau+y\cos\tau))$, $\tau = C_1-C_3/(1+x^2+y^2), C_1=0.4, C_2=0.9,C_3=0.6,d=0.6$. I am applying $T$ to point $(...
0
votes
1answer
110 views

Sketching a PDF function (discrete)

I have this distribution: $Probability = 2/(\operatorname{cosech⁡}(x))(k x^{2k}))/((2k))$ for $k$ = 1 to infinity. How can I do a sketch for any value of $x$?
4
votes
1answer
70 views

Binary (binomial) logistic regression with multiple independent variables: calculating the confidence range or prediction

Adding on top to this post here, I am looking for the confidence range (intreval) of the prediction of a multi variant binary logistic regression. Can someone extend the solution in the post ...
0
votes
0answers
52 views

Unexpected PDF in `FirstPassageTimeDistribution`

I am new to Markov Processes, and while learning the discrete Markov chain with the following matrix $$P=\begin{bmatrix}\frac{1}{3} & \frac{2}{3} & 0 & 0 \\ \frac{1}{2} & \frac{1}{2} &...
1
vote
0answers
31 views

A natural work with Missing values

For statistical procedures, is there some simple setting to automatically skip the Missing values? (e.g. Options -> "SkipMissing") The naive ...
0
votes
1answer
47 views

Does TTest taking into account the Welch's t-test?

TTest has an option VerifyTestAssumptions for "EqualVariance", does it automatically switch to Welch's t-test when variance of the two data sample differ a lot?

1
2 3 4 5
33