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
3 answers
326 views

How to plot the the maximum likelihood estimates?

I would like to find the code for the graphical representation of the maximum likelihood estimates. For that first, I find the estimate values using the the code given below ...
0 votes
0 answers
57 views

Does mathematica allow abstract probability manipulation

Does Mathematica allow testing abstract algebraic relationships with probabilities? For example, checking a relationship between probabilities without expressing the form (e.g. binomial etc.) of these ...
  • 101
3 votes
2 answers
131 views

Simplifications assuming function is a probability distribution

Is it possible to define a generic probability distribution function (pdf) so Mathematica can use its properties to simplify expressions? For example: ...
  • 131
1 vote
1 answer
84 views

Unclear piece of the documentation to BinomialDistribution

Looking in the documentation , I read The probability density and cumulative distribution functions may be given using PDF[BinomialDistribution[n,p],x] and ...
  • 19.6k
2 votes
1 answer
92 views

How to Work Student t-Distribution

I'm working with the sampling distribution of the sample mean and sample variance. For my data, I have the following sample mean = 0.418, standard deviation = 0.306, and degrees of freedom = 44. I've ...
  • 1,199
0 votes
0 answers
32 views

How does Mathematica work with multivariate distributions?

I recently found the AEP algorithm. Curious how Mathematica would handle the situation, I made an experiment: ...
1 vote
2 answers
112 views

Linear extrapolation

My question is not really related to Mathematica; however, I put it in a way that uses Mathematica, so perhaps someone could help here. I'm given a set of data as ...
  • 334
0 votes
0 answers
23 views

How to retrieve the support of a multivariate distribution

I have the following process: ...
  • 111
4 votes
1 answer
221 views

Mathematica Related Book, Website or Github on Bayesian Statistics/Analysis

I just started working on Analysis with Mathematica, and I am loving every bit of it. I was wondering if there is a similar book geared toward bayesian statistics with mathematical? An alternative ...
1 vote
1 answer
48 views

Mean of List of Coordinates

Imagine I have the following list l = {{1, 2}, {1, 3}, {2, 4}, {2, 2}, {2, 3}} I want to take the mean only regarding the second element. That is, I want to find ...
  • 4,250
3 votes
1 answer
138 views

Pattern in lists

I have lists of numbers, the numbers indicate a position on a circle. The numbers can only be from 1 to 8 (like an analog clock with 8 hours). The numbers represent a change in position of an object ...
  • 297
3 votes
2 answers
251 views

Draw the histogram of the CDF of a Gaussian Distribution

I would like to show that the histogram of the CDF of a Gaussian distribution is a uniform distribution. The Python code is as follows: I try to translate the code into mathematica, but I have ...
0 votes
1 answer
79 views

Is there a way of calculating Expectation Values of tensor operators in Mathematica?

This Wikipedia article in on Bell's Theorem lists a whole bunch of expectation values for Bell states: $$\langle A_0 \otimes B_0 \rangle = \frac{1}{\sqrt{2}}, \langle A_0 \otimes B_1 \rangle = \frac{1}...
  • 243
3 votes
1 answer
107 views

Bonferroni in ANOVA

Hi I am trying to use ANOVA to compare between the groups. I came across an article "bonferroni" which explains a method to do a Bonferroni test in R. However, I am unable to find a function ...
  • 857
3 votes
3 answers
360 views

Sum of an arbitrary number of random variables

I'm trying to sum an arbitrary number of random variables (in this case, 3, but I'd like to be able to easily vary that)... this does not work ...
  • 1,435
2 votes
0 answers
66 views

Solving stochastic equation

I am trying to solve, numerically, a classic stochastic Liouville's equation, namely \begin{equation} \frac{dA(t)}{dt} = -B(t)A(t)+ {\cal C}(t) \end{equation} with $B(t)=\cos(\omega t)$, and ...
  • 551
7 votes
2 answers
245 views

Obtaining formula of $E[X^T A X B X^T CX]$ for Gaussian $X$

Suppose $X$ is an $m\times n$ random matrix where rows are I.I.D. samples $x$ of $n$-dimensional Gaussian. The code at the end of the post verifies a candidate (incorrect) formula for the following ...
0 votes
1 answer
47 views

Simulate a binomial distribution experiment

I am trying to write a user-defined function to simulate a binomial experiment as following: ...
1 vote
0 answers
28 views

Problem about Reduce when using MomentGeneratingFunction for a ParameterMixtureDistribution: Too slow

I use the following code to calculate the MGF of $\lambda_{t+1}$. However, it posts a message about Reduce. My guess is that the parameter values are not restricted,...
6 votes
4 answers
339 views

Sampling from intersection of sphere and simplex

I need to isotropically sample vectors in $\mathbb{R}^d$ of Euclidean norm $c$ such that components are positive and add up to 1. Any suggestions how to do this in Mathematica? For $d=3$ this means ...
4 votes
2 answers
191 views

Mathematica can't find Minimum sum under integer constrains

I'm trying to verify a solution to a simple probability problem using Mathematica. Here's the problem: A drawer contains red socks and black socks. When two socks are drawn at random, the probability ...
0 votes
0 answers
29 views

Tools for generating and analyzing fault trees

Are there any tools available to generate or analyze a fault tree diagram? I’m aware of the FailureDistribution function, but I’m looking for something which can ...
  • 5,330
-1 votes
1 answer
73 views

PDF of a transformed random variable [closed]

i have the function $t(Θ)=4/(4+C*cos(θ)+D*(cos(θ))^2))^2 $ the θ follow the uniform distridbution i want to find the pdf of τ Αccording to theory the pdf of t is $f(t)=(\frac{1}{|\frac{...
  • 1
1 vote
1 answer
60 views

Implementing a way of generating binary data for use in a logistic regression

Background I want to generate a set of test data to be used in a logisitic regression. As an example consider the scenario where a cannonball is fired at a wall. There are only two outcomes: the wall ...
  • 107
5 votes
1 answer
110 views

Logistic regression - Confidence interval for x axis

Background I have a set of binary test data of the form ...
  • 107
1 vote
1 answer
49 views

Speeding up sampling of Gaussian entries

I'm trying to speed up sampling from the projected Gaussian distribution (like Gaussian, but vectors normalized to have norm 1). Code below generates $d$ samples of size $d$ and it's about 300x slower ...
4 votes
1 answer
326 views

How to demonstrate Benford's Law using Mathematica?

I tried to use Mathematica to demonstrate Benford's law. My problem may be with my understanding of the law. The code below shows how many times each digit from 1 through 9 is the leading digit in all ...
  • 129
9 votes
5 answers
719 views

Speeding up computation of Gaussian integral

Suppose $x$ comes from standard normal in $d$ dimensions. Are there NIntegrate tricks I can use to speed up the following Gaussian integral? $$f(a)=E_x\left[\frac{...
4 votes
1 answer
133 views

Tricky `FindRoot/NExpectation` problem

What's the best way to solve the following with $x\sim \text{Normal}(0,1)$? $$E_x[\log(1-2 a x^2 + a^2 x^4)]=0$$ Idea 1: FindRoot ...
3 votes
1 answer
100 views

NIntegrate options that work better for NExpectation[Log[1 - 2 a x^2 + a^2 x^4]^2

The problem below fails to converge to default accuracy using default method. ...
0 votes
0 answers
20 views

Estimate parameters from random samples drawn from a copula distribution [duplicate]

I defined a copula distribution as follows: ...
  • 359
1 vote
3 answers
173 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....
  • 5,225
1 vote
3 answers
75 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 ...
  • 606
1 vote
1 answer
91 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\...
  • 123
0 votes
1 answer
85 views

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

This distribution is univariate ...
  • 359
1 vote
1 answer
111 views

Computing expectation with some constants [closed]

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 ...
  • 123
5 votes
1 answer
213 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 ...
  • 363
1 vote
1 answer
108 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
82 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 ...
2 votes
2 answers
98 views

What's wrong in my custom distribution?

i want to write this function ...
  • 359
0 votes
0 answers
25 views

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

this is basic pareto distriibution ...
  • 359
0 votes
1 answer
58 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\...
0 votes
0 answers
68 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?
  • 1
1 vote
0 answers
93 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
58 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,583
2 votes
3 answers
170 views

Remove Outliers in BoxWhiskerChart

Is it possible to automatically remove the outliers that are detected by "Outliers" within BoxWhiskerChart? Somehow <...
  • 4,250
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
47 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 ...
0 votes
1 answer
83 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
381 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)$?

1
2 3 4 5
36