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
1answer
25 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
1answer
58 views

Outputting probability of rolling 6 dice N times, generating a new output each roll

I am looking to output the probability of n classic six-sided dice but I am not sure how to go about starting. This is what I have written out so far, but no way to go about accounting for n dice for ...
4
votes
1answer
121 views

Third/Fourth derivative of cross-entropy loss

I need a nice formula for the third (or fourth derivative if it's easier) of cross-entropy loss $\frac{\partial^3 J}{\partial z^3}$ where $$J(p(z)) = -\sum_i q_i\log p(z)_i$$ $$p(z)_i=\frac{\exp z_i}{\...
2
votes
2answers
90 views

Verifying probabilities equality by imposing conditions

I'd like to verify the following equality in Mathematica: $$ P(Z_1+Z_2=2,Z_1=1,Z_2=1)=P(Z_1=1,Z_2=1) $$ by knowing that $Z_1,Z_2 \in \lbrace 1,2,3,4 \rbrace$ are two independent and uniform random ...
0
votes
0answers
23 views

Express symbolic equation of KL Divergence between multivariate distribution succinctly in matrix form using Mathematica

I would like to express the KL Divergence between 2 multi-variate Gaussian distributions in matrix form. I am able to compute the symbolic form but it essentially gives the output fully simplified ...
-5
votes
1answer
70 views

Counting Technique [closed]

Words with 6 letters are to be formed from the word "MEDICALOUS". If repetition is allowed, find the number of possible 6-letter words that can be formed if there is at least one letter ...
2
votes
2answers
156 views

Can the CopulaDistributions be fitted?

This is an immediate follow-up to DoAny--which I did consider editing, clarifying and correcting in some respects. But perhaps here I can put the immediate question at hand more directly (the emphasis ...
5
votes
1answer
97 views

BoxWhiskerChart with summary statistics [duplicate]

I would like to duplicate a BoxWhiskerChart, such as this: but I do not have access to the full dataset that generated it. I'm happy to type in by hand summary statistics (such as mean, 25%, 75%, ...
5
votes
2answers
241 views

Optimizing sequential computation

The following question came up in reading group discussion of paper -- imagine taking two vectors, multiplying each by a random matrix, then taking tanh pointwise. If you repeat this process forever, ...
1
vote
3answers
213 views

Do any of the Mathematica CopulaDistributions (or others) fit well this sampled bivariate copula with uniform marginals over [0,1]?

I'm currently developing a data set that consists of two $50 \times 50$ matrices, which I designate as q1 and Q1. I strongly believe (bordering on formal proof [cf. Corollary 1 in marginalinvariance]) ...
2
votes
0answers
34 views

Creating a distribution of random sample means

The following is taken from Chapter 19: Distribution of Random Sample Means from the book: Illuminating Statistical Analysis Using Scenarios and Simulations. Fifty random monkeys, each randomly pick ...
0
votes
0answers
26 views

Building and Plotting a discrete CDF

I'm trying to plot the CDF of a simple "nCr" experiment: A box contains 4 screws and 6 nails. Two items are drawn at random without replacement. Let X be the number of nails drawn. I built a ...
0
votes
1answer
90 views

Can this previously solved three-dimensional constrained integration also be solved with certain added products in the integrand?

In Solved3DConstrainedIntegration the constrained three-dimensional (Hilbert-Schmidt-metric-based HSmetric) integration problem for the absolute separability probability of the two-qubit (quantum bit)...
4
votes
2answers
301 views

Polynomial fitting to obtain the growth rate

We -- my friend -- had asked a question here, which was not completely related to Mathematica, however, in a hope that someone familiar with the topic could help. There are still some aspects which we ...
2
votes
1answer
68 views

Convolution of two independent geometric random variables with parameters $p$ and $q$ [closed]

I am trying to use Mathematica to do some computations in Advanced Probability. I am quite new to Mathematica, so I need help in understanding the Convolve function. I used Mathematica 11 to compute ...
0
votes
1answer
58 views
1
vote
0answers
28 views

How to draw a line marking where each chapter occurs in a text? [duplicate]

I am performing a text analysis on C.S. Lewis's book The Lion, the Witch, and the Wardrobe. I have created the following analysis of textual occurences of Aslan or Lion, Peter, Lucy, Edmund, Susan, ...
1
vote
1answer
57 views

Probit with Equality Constraint

I have a set of data that I analyze using a probit model. However, because of the way that the data are produced, the effect of two variables should be equal. Say, it is a room tilting down from the ...
2
votes
1answer
76 views

Root mean square error of bearings

I have two sets of bearing angle data, one is forecast and the other one is actual, i.e. ...
1
vote
0answers
67 views

Full Information Maximum Likelihood - Under some other name in Mathematica

I have recently stumbled upon something called FIML - Full Information Maximum Likelihood. Apparently this methodology helps overcome missing variables provided the gaps are random. Searching the ...
5
votes
2answers
308 views

How can I speed up RandomVariate in the following case?

I would like to generate random values of some parameter with the weight being the Poisson distribution. An important point is that each time I generate the random number I need to consider the ...
1
vote
2answers
106 views

How to obtain the variance of a chi-squared distribution with Mathematica

I'm new to Mathematica and would like to show that for $x_1, ..., x_k$ independent, standard normal random variables the variance of the sum of their squares, i.e., $var(\sum_{i=1}^kx_k^2)$, is equal ...
1
vote
1answer
80 views

Evaluate area of random region covered by disks

If I cover a square of side $L$ with $n$ unit disks at random (the disks may overlap the boundary), is there a standard way to evaluate the total covered area $A$? I am looking to observe the density $...
3
votes
2answers
117 views

Specifying options to underlying `Integrate` when using `NExpectation`

I'm computing the max over a set of uniformly distributed random variables. I know that this value converges to 1 as the number of variables increases. Mathematica is having difficulty computing the ...
1
vote
0answers
42 views

Why does making this expression more complex speed up the call to `Probability`?

I have the following code: ...
1
vote
2answers
44 views

`KernelMixtureDistribution` error message about precision

I want to use KernelMixtureDistribution to deal with a large amount of data points. For example, the following codes shows how I use it: ...
2
votes
1answer
51 views

Finding distribution of sum of two dependent variables

I am trying to find the distribution of the sum of two random variables $(x_1,x_2)$ which have the following distribution: $$f(x_1,x_2) = \begin{cases}2 ( x_1 + x_2) & 0 \le x_1 \le x_2 \le 1 \\ 0 ...
1
vote
1answer
78 views

how to perform operations on a subset of a dataset

I have this data set: ...
1
vote
0answers
34 views

Unexpected behavior in Bootstrap confidence interval in Mathematica [closed]

EDIT: I think this is expected. There was a bug in my python code I'm computing a bootstrap confidence interval using Mathematica. ...
1
vote
2answers
85 views

3D plot of the spatial path of velocity/space stochastic differential equations

I define the following 6 dimensional stochastic (Ito) process- in velocity v/position x. I can plot x1 as a function of t- see script below which has been corrected by Daniel. My goal is however to ...
0
votes
0answers
76 views

Incorrect result of PDF

The execution of the command ...
1
vote
1answer
66 views

How to add weights in fitting?

I have a set of data as: data = {{0, 0.046}, {40, 0.111}, {80, 0.291}, {120, 0.808}, {160, 1.742}, {200, 3.319}, {240, 5.017}, {280, 5.503}, {320, 5.897}} With ...
0
votes
0answers
31 views

How to compute the unbiased fit variance considering the option "Weights" in "NonlinearModelFit"

I am doing a non linear model fit. I know how the fit variance is computed when I do NOT assign weights to the fit, for example: ...
3
votes
1answer
86 views

How does Mathematica compute the covariance matrix using "MultiNonlinearModelFit"?

I am doing a simple multi-non linear fit. I get the covariance matrix. Does anyone know how Mathematica calculate this Matrix? I have found the computation when mathematica fit only one signal but ...
5
votes
1answer
246 views

How to make this Box Plot

I want to mimic the following style (not necessarily the same data) So far, I got the following ...
4
votes
1answer
126 views

Calculate median of pdf using NSolve [closed]

I was trying to compute the median of a pdf using NSolve, defined such that $$ \int_{0}^{\rm median}p(x)dx = \frac{1}{2} $$ but NSolve seems unhappy about solving for an upper limit of an integral. A ...
0
votes
1answer
94 views

Texas hold 'em poker game Probability task

I wrote this code below ...
2
votes
0answers
54 views

ExampleData problem

When running : iris = ExampleData[{"MachineLearning", "FisherIris"}, "Data"]; I get the message : ...
0
votes
2answers
72 views

Expectation[] not working for relatively simple expression under lognormal distribution

I am trying to find the expectation of a relatively simple expression under a lognormal distribution with mean [Mu] - [Sigma]^2/2 and variance [Sigma]^2 , but it hangs for a long while and eventually ...
0
votes
1answer
107 views

What is the probability that there are three or more consecutive numbers in these six cards?

52 poker cards (except the red and black jokers), 6 cards are drawn from them. What is the probability that there are three or more consecutive numbers in these six cards? The problem have been solved ...
0
votes
0answers
31 views

Conditional expectation from covariance matrix

Given a vector $\mu = \{\mu_x \mu_y \mu_z\} $ and an equivalent covariance matrix $\Sigma$, I used the following in Mathematica to compute the conditional expectation $\mathbf{E}(Y|Y+Z)$. ...
0
votes
1answer
107 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: ...
4
votes
0answers
60 views

Why is EstimatedProcess so slow for a vector ARProcess?

I'm trying to fit some 4 x N data to a vector auto-regressive model. However, EstimatedProcess is very slow for this. For a 4-th order vector AR process, it takes more than 10 seconds (for N approx. ...
4
votes
1answer
198 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
116 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
110 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
172 views

FindDistribution doesn't return a decent result

I have the following data set: ...
1
vote
1answer
52 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
63 views

CDF of a learned distribution doesn't evaluate

In this simple example ...

1
2 3 4 5
34