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
0 votes
2 answers
35 views

Weighted random choice from a list

I want to randomly choose one element from a list but preferring elements with small distance from the center of a list. How to do it properly say with normal distribution? I am not good at statistics....
0 votes
0 answers
15 views

Geometric randomized data distribution

Suppose we have a map ( geometric surface) with 5 parts or districts with different surface area size, if a certain number of dots randomly distribute on this map, can we predict dots how many dots ...
1 vote
3 answers
64 views

How to restrict FindDistribution to real-valued distributions

The following seems buggy to me, but perhaps I'm confused about something. Or maybe there's a workaround that makes it moot? First, I ask Mathematica to find a distribution that describes a dataset ...
1 vote
1 answer
82 views

Derivative of long expression renders Piecewise[…<<…>>…] in Jupyter notebook

My mathematical problem is to solve the optimization problem: $$ Max_{u} \quad \mathbb{E}[\gamma S-S^2]$$ where $$S= A_0 u X+a-\max(\alpha u X+b,0)$$ with $\gamma,A_0,a,\alpha,b$ some constants and $X\...
0 votes
1 answer
71 views

How to write a Bivariate custom distribution, calculate p value and other properties?

This distribution is univariate ...
1 vote
2 answers
87 views

What's wrong in my custom distribution?

i want to write this function ...
1 vote
1 answer
104 views

Computing expectation with some constants

I would like to compute the following expression in Wolfram alpha: $$\mathbb{E}[X-max(aX+b,0)] $$ where $X\sim N(\mu,\sigma^2)$ and $a,b$ are some constants. Without constants, I can get the result ...
5 votes
1 answer
192 views

Monte Carlo Simulation of Charged Particles in Non-Uniform Electric Field

I have a code (provided below) which simulates the motion of an ensemble of charged particles which are subjected to a complex static electric field which passes through some aperture in a metallic ...
0 votes
2 answers
399 views

How to plot this pdf

Let $x\sim N(\mu,\sigma^2)$ and $y=\max\{e^{x-1}-\kappa,0\}$. How to get and plot the pdf of y? In particular, there will be a probability mass at $y=0$, which is a nondifferentiable point. I tried <...
2 votes
4 answers
2k views

Fitting and plotting Weibull distribution

How can I find the best fitted 2-parameter Weibull's distribution (PDF) to describe my data? How can i plot my data and estimated distribution all in one graph? How can I show/compare results of ...
5 votes
1 answer
155 views

Is MeanPredictionBands synonymous with a confidence interval in Mathematica?

I am a little confused by Mathematica's use of the term prediction interval in NonlinearModelFit. We are given two kinds of prediction bands as an option: ...
1 vote
1 answer
92 views

Manipulating a Haar random unitary matrix and computing probabilities

I am new to Mathematica and its many features. Here is a problem that I was trying to model. Consider a $4 \times 4$ Haar random unitary $U$. Define by $|00\rangle \langle 00|$ the following matrix: \...
1 vote
1 answer
834 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 ...
1 vote
1 answer
231 views

Evaluate 3D- and 5D-constrained integrals for absolute separability probabilities

In a recent posting, TwoQubits user JimB, employing a change-of-transformations put forth by N. Tessore, was able to confirm a formula for the "two-qubit absolute separability Hilbert-Schmidt ...
8 votes
1 answer
339 views

Can LearnDistribution learn conditionality?

I would like to apply LearnDistribution to multivariate conditional distributions. Here's a simple artificial example: ...
1 vote
1 answer
65 views

How to plot copula using contourplots

I want to contour plot some copula cases for illustrative purposes in a paper. New user here, so apologies if this is straightforward. An example (taken from another source) is below of what I had in ...
0 votes
0 answers
23 views

how i write this custom distribution power function distribution i want to write in family distribution?

this is basic pareto distriibution ...
0 votes
1 answer
56 views

Expectation function vs Integral function

I am having trouble understanding how Mathematica computes a conditional expectation. Consider random variables $v\sim N(0,\tau_v^{-1})$, $s_0=v+\epsilon_0$, $s_1=v+\eta+\epsilon_1$, where $\epsilon_0\...
1 vote
0 answers
67 views

How to generate random points with weight distribution and specific criteria? [duplicate]

Consider some function $f(E_{1},E_{2})$, say $$ \tag 1 f(E_{1},E_{2}) = \exp[-E_{1}^{3}+E_{2}^{2}] $$ I want to generate random $n$ points $E_{1}$, $E_{2}$ using this function as weights, with an ...
0 votes
1 answer
76 views

Law of propagation [closed]

If i have weight average of independent variables how i should calculate uncertainty. E.g Function F=( w1x1 + w2x2 )/w1+ w2 And followed errors For w1 error e1 For w2 error e2 For x1 error e3 For x2 ...
0 votes
0 answers
52 views

How to do Linear Mixed Effect Model in Mathematica?

I have been trying to find out some packages and codes to realize the Linear Mixed Effect Model, but I failed. Does anyone know how to realize this?
0 votes
1 answer
133 views

Texas hold 'em poker game Probability task

I wrote this code below ...
1 vote
0 answers
43 views

Paclet specialized for circular statistics?

I recently came across "answering biological questions using circular data and analysis in R". Is there a similar Mathematica Paclet for circular statistics analysis -- that includes ...
1 vote
0 answers
54 views

How to measure a LearnedDistribution?

I would like to measure the qualities of a LearnedDistribution in general and with regard to test sets. The docs say that it takes an option ValidationSet, but ...
3 votes
1 answer
75 views

Failure in MultinormalDistribution

My RandomVariate fails to evaluate when sampling from a multinormal distribution, any idea what's happening here? This is Mathematica 12.1 on Mac: ...
2 votes
3 answers
153 views

Remove Outliers in BoxWhiskerChart

Is it possible to automatically remove the outliers that are detected by "Outliers" within BoxWhiskerChart? Somehow <...
0 votes
1 answer
157 views

Solve for p of Binomial distribution

Is there a way to solve for the probability p of a binomial distribution in a set of equations? With some arbitrary functions g[ _ ] and f[ _ ] such that: ...
0 votes
1 answer
133 views

Histogram Plot Gaussian Distribution

I have to construct functions to obtain random numbers from a Gaussian Distribution with mean $\mu$ and variance $\sigma^2$ by using box-muller method and testing the function by sampling from a ...
0 votes
0 answers
16 views

how to find the CDF of double truncated exponetial distribution [duplicate]

tring to find the cdf of double truncated exponetial distribution using the follwing code ...
2 votes
0 answers
42 views

Converting between mean time between failures and survival probabilities

This is more of a math question, but I'm hoping some math wizard can help me map these concepts to functions in Mathematica's reliability API. $f$ of my machines will experience a failure in the first ...
7 votes
1 answer
91 views

How to calculate a PDF of a neural network output?

I have to find the probability density function of the output of an internal layer in a neural network. I wanted to do it using NetMeasurements adding a layer like <...
3 votes
2 answers
116 views

Modifying DistributionChart Bin Counts

I have a dataset (converted to a list of lists) that has 50 records, the first column of which represents the number individuals of a species taken in a trawl, the second column the minimum depth of ...
0 votes
1 answer
66 views

PDF of double truncated exponential function [closed]

I am trying to find the pdf of a double truncated exponential distribution using the following code: ...
3 votes
2 answers
365 views

How can I define a distribution and get the expectation in Mathematica?

How can I define a distribution and get the expectation in Mathematica for $a=a_H$ with probability $\lambda$ and $a=a_L$ with probability $1−\lambda$, where $\lambda\in(0,1)$?
0 votes
1 answer
66 views

Set up a distribution in LogLikelihood that depends on data

I want to define a loglikelihood function to perform a fit of some data points to a function, like the following, but using the native LogLikelihood[] function. $ likelihood=\sum_{i}(Log{(\frac{1}{\...
1 vote
0 answers
61 views

How To Fit Heston Model To Stock Data Stochastic Volatility Model

The stochastic volatility model known as the Heston model can be expressed in Mathematica in the following way https://reference.wolfram.com/language/example/HestonModel.html Define the Ito process of ...
5 votes
2 answers
893 views

Choosing The Best Fitted Probability Distribution Model

The following Example 20 Obs and i used Goodness of fit test with Exponential distribution, another time with Weibull distribution and third time with Pareto distribution .All of them are significant ...
2 votes
1 answer
363 views

Generate data through RandomVariate from an interpolated distribution [duplicate]

I have a few data point, that I can interpolate into a distribution. I want to be able to generate points that follow this distribution, but Mathematica does not seem to be happy. Here is my code: <...
3 votes
2 answers
619 views

Estimating Parameters of a Custom Distribution

The problem is I can not get estimation of parameters of any custom probability distribution (distributions are not built in Mathematica), here is an example: First: I entered random numbers of ...
4 votes
0 answers
124 views

Diffusion probabilistic model in deep generative modeling

Diffusion Models (http://proceedings.mlr.press/v37/sohl-dickstein15.html and https://arxiv.org/abs/2006.11239) are generative models gaining popularity in the community of deep generative modeling, ...
10 votes
5 answers
923 views

How can I efficiently calculate exact probability distributions for D&D dice like "4d8"?

I play a lot of tabletop role-playing games, and I have been interested recently in modeling the various game mechanics involving dice. As I see it, a single throw of an eight-sided die can be modeled ...
1 vote
1 answer
101 views

Varying values of parameters and sample size won't work

1.Hello , I have customized a distribution, and then trying to estimate the parameters for smaller values of sample size say n=10,30,40,50 and 60.It runs for n=10 and n=1000 and then it does ...
0 votes
1 answer
51 views

Spanning Subgraphs of random sizes with probabilities on edges

I need a way of taking some graph G and obtaining a spanning subset of G where each edge $e_i$ has some probability $P_i$ of being in the subgraph. So the size of the edge sets of each random subgraph ...
5 votes
4 answers
214 views

Solving equation over TruncatedDistribution (FindRoot)

I'm trying to solve the following equation : ...
0 votes
1 answer
66 views

Simulate geometric brownian motion and use generated data for calculations

I want to generate a geometric brownian motion A with mean $MuA$, variance $SA$ and starting value 0.05. I do the following: ...
3 votes
1 answer
55 views

ParameterMixtureDistribution with custom distribution

I am trying to use ParameterMixtureDistribution with a custom distribution as the first argument. It does not evaluate. In attempting to solve my problem, I ...
2 votes
1 answer
185 views

Goodness of fit [closed]

I want to evaluate the goodness of two sets or more fitting parameters, using Rsquared and RMSE (root mean square error), Then how to code?) ...
2 votes
2 answers
103 views

Definite Integral of Probability Distributions

Suppose at each value of $x$ I define a normal distribution dist[x_] := NormalDistribution[Sin[4 x], Cos[10 x]^2] Now I want to find the distribution $$ \mathcal{D}...
1 vote
1 answer
32 views

Getting the same result from Integrate as Probability

I'm trying to solve a Baysian inference problem (although the details are not all that important for this question) I define two probability distributions P and <...
4 votes
1 answer
128 views

FindDistribution and parameters

If I generate some data using data = RandomVariate[NormalDistribution[5, 3], 100] Then find the distribution using (1) ...

1
2 3 4 5
35