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
5 votes
2 answers
258 views

Nearest-neighbor density estimation in Mathematica

I want to use SmoothHistogram-like plot using smoothing kernel $f(x)$ which is uniform $(a,b)$ with $a,b$ adjusted for each $x$ to include 11 points on the left, ...
Yaroslav Bulatov's user avatar
1 vote
1 answer
52 views

Leading significant digits

Given that the initial area in a Sierpinski triangle is A_0 and the subsequent areas $$(A_n) =A_0 (3/4)^n$$ , what is the formula to calculate the leading ...
Rubens Vilhena Fonseca's user avatar
0 votes
1 answer
91 views

Bandwidth selection for histograms in bounded domain?

Does anyone have tips how to do proper bandwidth selection to visualize density which is known to be strictly positive? Example below uses SmoothHistogram and ...
Yaroslav Bulatov's user avatar
2 votes
1 answer
123 views

One more incorrect result of CDF

In 13.3.1 on Windows 10 I find ...
user64494's user avatar
  • 24.5k
5 votes
2 answers
231 views

An incorrect result of CDF

In 13.3.1 on Windows 10 I execute ...
user64494's user avatar
  • 24.5k
0 votes
1 answer
69 views

Any luck estimating a multivariate hidden Markov process?

I am having problems using EstimatedProcess to estimate a multivariate HiddenMarkovProcess. I'm following the work of a paper, so I know this method is feasible. In brief, given 2 economic variables: ...
Elliott's user avatar
3 votes
1 answer
103 views

Fast multivariate Cauchy sampling?

I've been using the code below to efficiently sample from multivariate Gaussian with diagonal covariance matrix. Now I want to try the same for Cauchy samples, however replacing ...
Yaroslav Bulatov's user avatar
3 votes
4 answers
341 views

Sampling from intersection of $n$-sphere and hyperplane

Edit How do I uniformly sample from intersection of $n$-sphere centered at 0 and an arbitrary hyperplane for $n\ge3$? Below is an approach using FindInstance to ...
Yaroslav Bulatov's user avatar
-3 votes
1 answer
110 views

How to calculate the Poisson index of dispersion? [closed]

I came across the Poisson index of dispersion. I find it very interesting. But I didn't understand how to apply it. It is simply necessary: ...
Frimand's user avatar
  • 95
0 votes
2 answers
70 views

Gamma Distribution: what to do after calculating Shape and Rate? How to proceed? [closed]

I got stuck while applying Gamma Distribution. Having Mean = 5 and Standard Deviation = 2, here's how I preceded: ...
Frimand's user avatar
  • 95
1 vote
1 answer
92 views

How can we plot horizontal prediction bands?

1. Problem statement Some game days before the end of a league season I want to show the possible final rankings (depending upon the results of the outstanding games). 2. Example data (situation after ...
eldo's user avatar
  • 49.1k
3 votes
1 answer
174 views

CorrelationTest vs PearsonCorrelationTest

I understand that these two functions consider different null hypotheses. However, although I can reproduce the calculation related to PearsonCorrelationTest from scratch, I cannot reproduce the p-...
Luis Diambra's user avatar
0 votes
0 answers
63 views

A geometric application of Benford's law [duplicate]

I would like some help solving the following problem using Mathematica: Show that, no matter what the initial area of an equilateral triangle is, the sequence of areas (painted in black) of the ...
Rubens Vilhena Fonseca's user avatar
3 votes
2 answers
189 views

Sort sequences by their "randomness"

Example matrix (rows always have equal lengths) ...
eldo's user avatar
  • 49.1k
1 vote
2 answers
116 views

Compute Central Moments of Vector

Say we have three stochastic variables defined as follows: ...
Mirko Aveta's user avatar
  • 2,150
5 votes
4 answers
390 views

An accumulated moving average

1. Problem statement In accordance with the standard definitions the inbuilt MovingAverage ...
eldo's user avatar
  • 49.1k
8 votes
6 answers
1k views

Problem on geometric probability

This is a problem from the recent 18th Kolmogorov competition on probability theory and statistics 2023. A random point P is chosen in an equilateral triangle. What ...
user64494's user avatar
  • 24.5k
1 vote
1 answer
101 views

Pick random value based on list of probabilities

I'm pretty sure this must have been asked before, but I can not find the duplicate. Given a list of values with their probabilities ...
infinitezero's user avatar
  • 1,357
0 votes
0 answers
39 views

CompiledFunction fails for Variance with a rank 3 input

Why does compiling Variance for a rank 3 input fail but Mean works? ...
IntroductionToProbability's user avatar
0 votes
1 answer
59 views

Function to generate analytic solution of StandardDeviation of a list given sublists

Motivation I have the Mean and StandardDeviation of several lists of equal size but I don't know the elements of those lists. I ...
IntroductionToProbability's user avatar
0 votes
2 answers
59 views

Modifying horizontal axis of a PDF plot

I have a bunch of particles that I can measure their volume. PDFs of the size distribution by volume of particles, v(a), measured are reasonably well represented by lognormal distributions of the ...
Mahdi Razaz's user avatar
3 votes
0 answers
71 views

How can I calculate P-Value for a custom distribution?

I used DistributionFitTest but it works only with a defined distribution. This is the distribution that I used: ...
A Day's user avatar
  • 59
2 votes
2 answers
104 views

Optimization of a Markov сhain with symbolic transition rate

I am trying to work on 1D random walk that can move to left, right or stay with probabilities $p_i$,$q_i$,$r_i$ that changes with the site $i$. I am trying to simulate this by using a recurrence ...
Hugo Andrade's user avatar
6 votes
5 answers
335 views

How to select elements from a list using another list

I have two lists: list1 and list2: ...
Tugrul Temel's user avatar
  • 5,508
0 votes
1 answer
40 views

Trying to use ProbabilityDistribution for custom distribution - Getting errors/warnings I don't understand

I have this custom distribution that I want to use in Mathematica, but there appears to be some sort of problem I don't understand. Also, when I compute the mean for the custom distribution via ...
PiE's user avatar
  • 427
6 votes
4 answers
404 views

Visualizing empirical PDF from monotonically decreasing density

I have a sample from distribution whose density is known to be monotonically decreasing. What's the easiest way to incorporate this information into Mathematica for an empirical density plot? Looking ...
Yaroslav Bulatov's user avatar
0 votes
0 answers
55 views

Obtaining moments from the *inverse* of the moment-generating function?

I have a moment generating function $z=\phi(t)$ whose inverse has the following form for integer $k>0$ $$t=\frac{z}{(1+z)^{k+1}}$$ How would I get the moments? Code below uses ...
Yaroslav Bulatov's user avatar
-5 votes
1 answer
97 views

Unable to check own distribution

Good afternoon I need to estimate different distributions from some data. Among these distributions, it is necessary to use the Kritsky-Menkel distribution. I set a formula for the distribution ...
Hey Moon's user avatar
1 vote
0 answers
79 views

Getting behavior around 0 for spectrum of product of Gaussian matrices?

Edit the math part was answered in mathoverflow, I'm now looking on how to port this to Mathematica to check against observed fit Consider a product of $k$ independent square matrices with IID ...
Yaroslav Bulatov's user avatar
2 votes
1 answer
207 views

Second Order Probability

The literature has considerable discussion of higher order probabilities and in particular second-order probability, which is the probability that the true probability of something has the value P. ...
stuartn's user avatar
  • 71
0 votes
0 answers
69 views

Identifying $X^2$ relationships between random variables

Given $X$ coming from a known distribution faily, how do I identify distribution family of of $X^2$ and $\sqrt{X}$? Code below uses ...
Yaroslav Bulatov's user avatar
0 votes
1 answer
60 views

Fitting data to peaks visually with manipulate - how to compactly implement for many peaks

I am trying to create a visual aid for peak fitting. There should be a background profile and on top, I want to place peaks. So far, I am stuck with the following issue. For simplicity, I am using a ...
atapaka's user avatar
  • 3,733
3 votes
1 answer
121 views

FindPeaks in a 2d list and half values

FindPeaks is a nice little help. But it only works on 1D lists and tends to return half integer values for positions of the peaks which are ultimately very useless ...
atapaka's user avatar
  • 3,733
2 votes
2 answers
85 views

Grouping expressions by their $O(..)$ rate of growth around 0

Given a list of expressions like $3 x^2,\frac{\sqrt{x}}{\sqrt{2}},\frac{2 \sqrt{x}}{\pi },\frac{9 x^3}{2},x,$, how could I group them based on their rates of growth around 0? IE, $2x$ and $3x$ are ...
Yaroslav Bulatov's user avatar
1 vote
1 answer
118 views

Sampling from density specified in terms of spacing ratios?

Given a sorted vector of positive reals $\{\lambda_1,\lambda_2,\ldots,\lambda_P\}$ and corresponding vector of spacing ratios $r_i=\frac{\lambda_i-\lambda_{i-1}}{\lambda_{i-1}-\lambda_{i-2}}$, I know ...
Yaroslav Bulatov's user avatar
0 votes
1 answer
178 views

How to Draw a Probability Tree Diagram to Calculate the Probability of Badminton Competition Game?

Question: A, B, and C students will participate in a badminton competition, and the agreed format is as follows: Those who have accumulated two losses are eliminated; Draw lots before the competition ...
csn899's user avatar
  • 2,905
5 votes
2 answers
160 views

Can the type 3 SS be obtained using the ANOVA function or an adaptation that is readily available in Mathematica?

The default output for the ANOVA function is that of a type 1 Sum of Squares (SS) table. This is sufficient for a one-way ANOVA, however, when running an n-way ANOVA (with n greater than 1) and ...
Joel's user avatar
  • 53
1 vote
3 answers
81 views

Visualizing range of possible CDFs of $X\in (0,1]$ such that $E[X]=1/3$

What's an elegant way to visualize the range of possible CDFs for a random variable $X\in (0,1]$ such that $E[X]=\frac{1}{3}$? Below is an attempt by discretizing (0,1] interval and using ...
Yaroslav Bulatov's user avatar
2 votes
2 answers
121 views

Calculating Distributions that Have Dependencies

I want to calculate a distribution from a function that depends on several variables, where there is an interdependency between the variables. This works: ...
Brian's user avatar
  • 133
5 votes
1 answer
140 views

Visualizing density given by its Stieltjes transformation?

How can I use Mathematica to get $f(y)$, the PDF of a random variable given its Stieltjes transform $g(s)$? $$g(s)=E\left[1/(s-X)\right]$$ I need to visualize probability density of a random variable ...
Yaroslav Bulatov's user avatar
1 vote
3 answers
208 views

Finding a continuous distribution that fits the empirical density of dataset $1,1/4,1/9,1/16\ldots$

I have a list of coefs of the form $1,1/4,1/9,1/16,\ldots,1/d^2$ sampled with relative sampling frequencies $1,1/4,1/9,1/16,\ldots,1/d^2$. How do I find a nice continuous density whose CDF closely ...
Yaroslav Bulatov's user avatar
0 votes
1 answer
62 views

`MomentGeneratingFunction` producing a function with negative moments

I'm getting moment generating function which is negative and all moments are $-\infty$ which seems wrong...1) is this a bug in MomentGeneratingFunction? 2) what is ...
Yaroslav Bulatov's user avatar
2 votes
2 answers
155 views

Getting distribution of squared coordinate on a sphere?

Suppose $\mathbf{x}$ is on a surface of n-sphere, how do I get the distribution of $x_1^2$? Distribution of $x_1$ is shifted Beta so we can use ...
Yaroslav Bulatov's user avatar
1 vote
1 answer
76 views

Deriving variance component of 1-Way ANOVA?

My goal is to drive $E(MSA)$ for this design(the 1-way ANOVA); $$y_{ij}=\mu +\alpha_i + \epsilon_{ij}$$for i=1,2,...,a (that is, there are a groups)and j=1,2,...,n. $\epsilon_{ij}$ and $\alpha_i$ are ...
Soon's user avatar
  • 399
1 vote
2 answers
89 views

The problem of finding the maximum coefficient term in the binomial expansion,Find the value range of K

The problem is shown in the figure, and the result should be the range of K obtained at the end of the image ...
csn899's user avatar
  • 2,905
2 votes
3 answers
133 views

How to find the K value in the probability inequality of binomial distribution?

dist = BinomialDistribution[100, 1/3] Solve[{PDF[dist, k] >= PDF[dist, k - 1], PDF[dist, k] >= PDF[dist, k + 1]}, k] // FullSimplify In this binomial ...
csn899's user avatar
  • 2,905
7 votes
5 answers
329 views

Quickly simulating "mean-time until collision"

Edit high-level summary of problem/solutions in Mathematica community post Suppose I draw (with replacement) $k$ colored balls from bins with probabilities $h_1,\ldots,h_d$ until some color is drawn ...
Yaroslav Bulatov's user avatar
2 votes
2 answers
79 views

Work-arounds to InverseFunction not evaluating?

Inverse CDF of Marchenko Pastur fails to evaluate at seemingly random points as you can see below. Is there an easy workaround? ...
Yaroslav Bulatov's user avatar
3 votes
2 answers
141 views

Non-uniform birthday problem in Mathematica

Suppose my year has $d$ days. I have a vector of probabilities of being born on those days as $h=p_1,\ldots,p_d$, and want to estimate the smallest $k$ such that probability of of birthday collision (...
Yaroslav Bulatov's user avatar
3 votes
0 answers
168 views

FindDistribution analog: automated data modeling with all Wolfram statistical distributions

BOUNTY GOAL To get bounty I am asking to build a function that serves as an analog of FindDistribution. You can also simply re-implement ...
Vitaliy Kaurov's user avatar

1
2 3 4 5
38