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
2 votes
2 answers
87 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}...
user avatar
2 votes
1 answer
164 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?) ...
user avatar
  • 41
1 vote
1 answer
29 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 <...
user avatar
4 votes
1 answer
111 views

FindDistribution and parameters

If I generate some data using data = RandomVariate[NormalDistribution[5, 3], 100] Then find the distribution using (1) ...
user avatar
3 votes
1 answer
52 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 ...
user avatar
5 votes
1 answer
109 views

Evaluating PlusMinus to 2 decimal answers

How do I evaluate and expand an expression containing PlusMinus such that: N[PlusMinus[1, 1]] returns 2, 0 I'm stuck at ...
user avatar
2 votes
1 answer
92 views

Bug in Transformed Multi-Normal distribution?

Why is the Mathematica resulting in the weird output whenever the number of variables in the transformed distribution becomes greater than the number of variables in the original multivariate ...
user avatar
  • 351
3 votes
1 answer
116 views

Error in Metropolis-Hastings with three states?

I wanted to create a simple example of the Metropolis-Hastings algorithm as a sanity check but the check failed and the results do not line up. I have a vector of energies $\vec E=(E_1,E_2,E_3)$ and ...
user avatar
0 votes
0 answers
23 views

Generating Gaussian-distributed initial conditions from a given bivariate probability density function

I have a coupled system of ODE's for which I would like to choose some initial conditions in the variables (x1,x2) at some initial time, ...
user avatar
1 vote
1 answer
75 views

Displays the mean and standard deviation on the same line [duplicate]

I have data displayed on a line, I want to present the mean as a horizontal line and a standard deviation as a vertical line. Example to code: ...
user avatar
  • 215
1 vote
1 answer
41 views

Correlation Matrix Not Working on All Numerical Dataset

I am trying to perform a correlation matrix on an all numerical dataset, imported from a .csv with headers specified as row 1: ...
user avatar
5 votes
2 answers
459 views

How do you generate a random number with a pre-specified probability distribution?

I want to generate a random real number between 0 and 1 but not distributed uniformly but with a probability distribution say, 2 Sin[ pi x ]^2 which integrates to 1 ...
user avatar
3 votes
5 answers
211 views

Check how far positions in list to straight line

I have a list of X and Y positions, I do not know what the length of the list. I want to create a straight line only by use the first and last position in the list. Then, I want to check how far the ...
user avatar
  • 215
0 votes
0 answers
42 views

Non-Gaussian Hidden Markov Process

I'm using estimated process to simulation a Hidden Markov Process with two states using data derived from different ARIMA processes ...
user avatar
1 vote
1 answer
45 views

InverseCDF gives $\infty$ error with an argument $1-t$ where t is very small

InverseCDF works fine with the normal distribution quite far out on the right tail, but eventually I am getting an $\infty$ error. Thus ...
user avatar
  • 175
5 votes
2 answers
138 views

How to measure the volume of a 3D point cloud - not using ConvexHull or RippleyRassonRegion. Rather like "boundary" function in MatLab

RipleyRassonRegion and ConvexHull provide the smallest convex region enclosing all points in the set. For regions with real concavities, the volume of this region overestimates the actual volume. For ...
user avatar
2 votes
2 answers
96 views

Efficient alternatives to a Table based iteration

I have performed some operations using the Table iterator but I am looking for efficient alternatives to my approach. First, some preliminary code: ...
user avatar
  • 187
2 votes
2 answers
53 views

Histogram and probability curve for a range of values

I don't know if I will be clear about what I am asking for, but here is my problem: how could I create a histogram (with the probability curve, later) when I have many different values (each one with ...
user avatar
  • 713
1 vote
1 answer
64 views

Color each curve with its proability to appear

I have a function f(x) which is dependent on a random parameter a. I can define a matrix Y containing {x,f(x),P}, where P is the probability that the curve appears. I would like to plot these curves ...
user avatar
7 votes
1 answer
419 views

Tuples optimization challenge

Consider a function that for a given integer $0\le n <256$ computes the number of leading zeros in its binary representation. ...
user avatar
  • 15.7k
0 votes
0 answers
46 views

Error Integrate::ilim: Invalid integration variable or limit(s) in {0.1,0,1}. please help

I am making the code you can see below. I believe the error is that when I plug in values for x it also feeds back to the "dx" in the integration, how can I go around that? ...
user avatar
4 votes
3 answers
263 views

Expectation of a Sum

I'm using Expectation to calculate the Gaussian integral of a user-supplied function. The following works well and fast (< 1 second): ...
user avatar
  • 17.6k
7 votes
0 answers
95 views

How To Install R Packages Via R Link In Windows

So it looks like I got RLink working on my Windows machine: ...
user avatar
0 votes
0 answers
38 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 ...
user avatar
0 votes
1 answer
67 views

How do I calculate Mean Squared Error of parameters alpha and beta? [closed]

...
user avatar
6 votes
0 answers
162 views

How To Fit ARMA(1,1)-GARCH(1,1) Model

An ARMA(1,1) model is defined as the following $X_{t}=\alpha_{0}+\alpha_{1}X_{t-1}+\epsilon_{t}+\beta_{t-1}\epsilon_{t-1}$ where a GARCH(1,1) model is defined as $\epsilon_{t} = z_{t}\sqrt{a_{0}+a_{1} ...
user avatar
0 votes
1 answer
62 views

construct an unbiased estimator $\hat{\acute{\mu }_k}$ for $\acute{\mu }_k=E[X^k]$ [closed]

Problem: Construct an unbiased estimator $\hat{\acute{\mu }_k}$ for $\acute{\mu }_k=E[X^k]$ for any positive integer k. (1) show its unbiasedness. (2) find its variance $var[\hat{\acute{\mu }_k}]$ (3) ...
user avatar
0 votes
1 answer
52 views

How to find Chi Square and p value?

I want to fit derived distribution on real data using chi square goodness of fit and obtain the values of chi square statistic degrees of freedom and p value for the following data. ...
user avatar
4 votes
3 answers
248 views

How can I find the expected value of the max of two independent random variables

I want to find the expected value of $\max(X,Y)$, where $X,Y$ are independent geometric random variables with parameters 0.3 and 0.6, respectively. My approach is to do something like ...
user avatar
1 vote
2 answers
55 views

How can I count the number of times the $i$th element of two lists are equal?

I'm trying to sample $100$ numbers from the Geometric$(0.3)$ distribution, and $100$ numbers from the Geometric$(0.6)$ distribution, and compute $$\frac{\text{number of times Geom(0.3) value = Geom(0....
user avatar
3 votes
2 answers
120 views

Problems with animation

I am trying to make a random walk simulation with Animate, but somehow it doesn't produce the animation I want. ...
user avatar
1 vote
1 answer
75 views

Fitting data to a custom Pareto distribution

...
user avatar
  • 29
0 votes
1 answer
74 views

What is the largest value of a Poisson random variable with mean 1 [closed]

I know that a Poisson random variable (say with mean 1) is a discrete random variable that takes values on all non negative integers. I am curious to know what is the largest integer Mma could return ...
user avatar
  • 573
2 votes
1 answer
67 views

How to find conditional probabilities for simple 4 categories problem?

Imagine you are give the following problem: There is a 50% chance of diagnosing an illness correctly as "Known" instead of "Unknown". There is a 50% that available treatments &...
user avatar
  • 856
5 votes
1 answer
108 views

LogitModelFit to predict a categorical variable

I am trying to predict life expectancy based on GDP per capita and literacy rate. Life expectancy is coded as low and high, and the two predictor variables are numerical. Here is some sample data: <...
user avatar
5 votes
1 answer
83 views

LinearModelFit for ANCOVA Issues with Fitted Model & Plot with Bonferroni F-value corrections

In attempting to modify the example for generating an ANCOVA model for my data (data3), which is for purposes of illustration the first 20 and the last 20 records of a larger dataset. Here, I seek to ...
user avatar
  • 1,496
0 votes
0 answers
42 views

How to implement confidence intervalls into a Weibull-plot

I'm working on the plotting of a strength-dataset in a ProbabilityScalePlot and want to have a nicer version of how to automatically implement the confidence ...
user avatar
2 votes
3 answers
104 views

Custom normalization of Histogram

Let us consider the following lists SeedRandom[1] list1 = RandomReal[{-10, 10}, 1000]; list2 = RandomReal[{-10, 10}, 200]; Histogram[{list1, list2}, 100] The ...
user avatar
  • 1,578
2 votes
1 answer
78 views

ProbabilityDistribution[] function just hangs

I have this discrete probability function that I want to utilize with Mathematica's ProbabilityDistribution[] function The distribution is: ...
user avatar
  • 341
4 votes
0 answers
84 views

Why am I losing photons in a window?

I'm trying to model a window. For some distribution of light rays hitting the window, I'd like to determine the output angles, and the number of photons which are reflected or transmitted. I'd like ...
user avatar
  • 3,842
2 votes
1 answer
37 views

Generate covariance matrix from related random variable distributions

Say I have a random variable $X\sim\mathscr{N}\left(0,\sigma^2\right)$ and another random variable $Y=X+\varepsilon$, where $\varepsilon\sim\mathscr{N}\left(0,\eta^2\right)$ is independent of $X$. I ...
user avatar
3 votes
3 answers
256 views

How can I rotate a cube uniformly?

Background Alice, Bob, and the average shadow of a cube I use the following code to simulate this experiment, ...
user avatar
  • 6,510
1 vote
1 answer
115 views

How to calculate Jensen-Shannon divergence?

How to write the function (or any other methods) to calculate Jensen-Shannon divergence (JSD) for two (p and q) discrete probability distributions? I need to calculate JSD for too many different (over ...
user avatar
  • 383
1 vote
0 answers
39 views

I am searching for the Eigen stuff of a non linear transformation

I have a slightly odd problem I have been working on as part of a project on probability models. The full problem itself is not relevant but here is where I am stuck. I have a 6D space $P$, where all ...
user avatar
0 votes
1 answer
50 views

Making sense of Mathematica's Expectation Function [closed]

I have trouble understanding Mathematica's Expectation function. I understand that it is meant to calculate the expected value of a random variable. ...
user avatar
1 vote
1 answer
49 views

Wrong means given by `RandomFunction` for `StratonovichProcess`

Hello I was trying to compute mean of multiple Stratonovich integral (for $W$ standard Wiener process). $$ J_{(1,1)} = \int_0^1 \left(\int_0^s 1\,\circ \mathrm{d}W_t\right) \circ \mathrm{d}W_s $$ ...
user avatar
  • 211
2 votes
3 answers
177 views

Change of variables of a random variable

I'm looking for a way to perform the change of variable of a random variable. In particular, I've a random variable $X$ with probability density function: $$ f_X(x) = \begin{cases} a \, e^X \quad &...
user avatar
3 votes
3 answers
96 views

Problems with DiscreteUniformDistribution

DiscreteUniformDistribution does not seem to work as it should. For a very simple example, let's consider a discrete random variable with PMF given by prob(-1)=1/2 and prob(1)=1/2. First, we create ...
user avatar
  • 51
1 vote
1 answer
107 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 ...
user avatar
0 votes
1 answer
76 views

Using Tuples for creating the sample space [closed]

I want to use Tuples (if you know better way please let me know) to create the sample space for some events. Assume that I have 2 events each of which can change to ...
user avatar
  • 383

1
2 3 4 5
34