# 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.

1,407 questions
Filter by
Sorted by
Tagged with
867 views

### Problem with Covariance Matrix Output in NonlinearModelFit

I am running NonlinearModelFit based off of some simulated data and trying to fit to a function with more than one parameter. Eventually, I would like to fit to 5 ...
54 views

### How can I account for assumed X and Y errors when using findfit? [duplicate]

I'm using very noisy biological data, and I need to assume, when doing linear regression, that there are errors in both X and Y. ...
536 views

### DistributionFitTest with WeightedData?

My problem is related to statistical testing with weighted data. I have a data sample and I assume that a part of the data follows a specific distribution (Pareto). So I fit my data to a distribution ...
127 views

### Distance to a MultivariateStatistics median

I have a population of objects (each of which is described by a list of about a half-dozen real numbers), and I'd like to find some reasonable kind of distance between each of several different test ...
2k views

### How to generate a random data set with determined expected value and variance? [closed]

Recently I am doing my math homework and there is a question asking me to Come up with a dataset X that has at least 10 distinct numbers in it such that Expect[X] = 3.7, and Var[X] = 2.1. Actually I ...
348 views

2k views

### Linear regression with x and y errors

I have a question about finding a linear regression weighted with x and y errors. I found the answer provided by 0x4A4D in Estimate error on slope of linear regression given data with associated ...
85 views

### Changing GeometricBrownianMotionProcess function

Since the function GeometricBrownianMotionProcess is given by Mathematica I have some technical questions. If we consider the following example: ...
2k views

### Mathematica code for hidden Markov models (HMM)

I am looking for some simple Mathematica code to model an HMM with just a few states and an equal number of observable signals (emissions). I am hoping to generate sample paths and keep track of the ...
3k views

### How can I compute and plot the 95% confidence bands for a fitted logistic regression model?

I have a set of binary data that I' d like to fit a logistic regression model to and show the 95% confidence band around the fitted function. I can produce the regression model but how do I compute ...
975 views

### Covariance of transformed random variables

I am trying to solve the following: \begin{align*} &X \sim N(1,1)\\ &\mathrm{cov}(X, X^3) = \text{?} \end{align*} where $\mathrm{cov}$ is the covariance. How would you do this in ...
226 views

### Stochastic problem

I have to organize a small sports league and I am puzzled on how to create the game plan. We are 8 persons playing table soccer with 2 vs. 2 matches. The idea is that each person plays once with ...
2k views

### How can I calculate the correlation dimension and/or the Lyapunov exponent of a time series using Mathematica

I have a pretty long time series (4000 data points). How can I calculate the Correlation dimension and/or Lyapunov exponent for such data? Please also advise on how to import the data as well.
281 views

### CorrelationTest small bug?

Consider two Normally distributed random variables: x1 = RandomVariate[NormalDistribution[], {1000}]; x2 = RandomVariate[NormalDistribution[], {1000}]; I want to ...
566 views

### Unexpected behavior of confidence bands for data presenting two regions with uneven noise

Let's generate some noisy data with uneven noise. ...
570 views

1k views

### Probability density histogram with unequal bin widths

I am confused by output of Histogram and HistogramList for probability density ("PDF") when ...
111 views

### shortest paths in probabilistically weighted edges? [duplicate]

I understand Mathematica can find shortest paths. However, is it also able to find the most probable paths? I mean this is a case where edges are given probabilistic wights (from 0 to 1) and the most ...
209 views

### How to obtain an approximate function for SmoothHistogram3D?

I have a random distribution of points in the $x\!-\!y$ plane. I can obtain a graphical representation of the probability distribution function using ...
231 views

### Standard Deviation and StandardDeviationFilter

I found this scant description of StandardDeviationFilter in the documentation, implying one could use it to generate a moving standard deviation: I've got a need ...
201 views

### Combinations which do not have elements in common

I can choose 2 letters from the four letters $\{A,B,C,D\}$ in 6 combinations using the combination formula $$\frac{n!}{ r! (n-r)!}$$ ...
993 views

### Is it possible to marginalize one or several parameters obtained from fitting procedure?

Statistical model analysis package has a few fitting functions. Their arguments are data points, fitting model and parameters in the fit. The result is a set of best values for parameters, which ...
948 views

### Simulate a simple spinner

I'm teaching some simple ideas in probability to students in grade 7. The "spinner" below works, but I'm wondering how I could make it just a bit more realistic by having it actually "spin" around a ...
1k views

### How to get confidence bands of parameters from a fitting procedure?

I have done fitting of data points with a given model that has two parameters (A and B), using NonlinearModelFit. The result of the fit is the maximum of the ...
316 views

### build and estimate a time series process

I want to generate an EGARCH process. My problem is that I do not see how to create new processes beyond those available. The process itself is : $$\epsilon(t) = \sigma(t) \eta(t)$$ \log(\sigma(t)...
9k views

### How do I display a histogram with normalized counts?

I have some data corresponding to real number distances: {200.04053, 200.232123, 156.3242,...}, and I would like to bin these values and display them as a histogram ...
397 views

### Speeding up the non-negativity algorithm for multilinear function with interval probabilities?

The algorithm is a branch-and-bound algorithm that calculates the non-negativity of a multilinear function with interval probabilities. The lines 9-11 has an optimization that is explained on the 10-...
308 views

### Descriptive statistics of two events

I am trying to use the descriptive statistics feature of Mathematica to answer the following question: suppose I have two events, A and B, whose occurrence is described by a normal distribution around ...
240 views

### No Tukey Test on ANOVA package

I'm trying to use the ANOVA package and have mathematica display the Tukey PostTest, but all I get is this: ...
1k views

### Solving derivative of cumulative normal distribution log likelihood

I am a newbie and I'm trying to use Mathematica to obtain the symbolic Maximum Likelihood Estimation for a cumulative normal distribution. So far I have reached the step where I have the derivative of ...
3k views

### Multinomial logistic regression

Has anyone done multinomial logistic regression in Mathematica? The binomial case is essentially done on the LogitModelFit documentation page and works fine. I am ...
2k views

### Empirical Cumulative Distribution Function

I have a data set of the form $d=\{(y_1,x_1),(y_2,x_2)...(y_n,x_n)\}$ for a large $n$. A non-parametric plot of this data (a scatter plot where all observations are sorted along $x$ and joined with a ...
876 views

### How do I solve this probability problem with Probability?

Consider a stick of length 1. Pick two points uniformly at random on the stick, and break the stick at those points. What is the probability that the three segments obtained in this way form a ...
171 views

### PDF on TransformedDistribution of two BinomialDistribution too slow

I'd been doing my own convolutions of distributions for some calculations, decided to use built-ins. With ...
12k views

### How to use a 3×3 covariance matrix to plot an error ellipsoid?

I have a 3×3 error covariance in Mathematica, but I don't know how to use it for plotting the error ellipsoid. It would be great if you can show me how I can do that for the below covariance matrix: <...
367 views

### EmpiricalDistribution for Gini Coefficient Runs Slow

I am repurposing code that I found in this blog post (http://datavoreconsulting.com/sports/gini-coefficients-and-the-olympic-medal-race/) to generate the Gini coefficient for other data sets I am ...
1k views

### Cumulative frequency plot

I have the following data: data = {{0, 0}, {20, 1.4}, {25, 9.8}, {30, 32.2}, {35, 38.2}, {40, 15.6}, {45, 2.7}, {50, 0.1}}; where the second coordinates are ...
2k views

### Graphical Plots of PDF and CDF

I have a joint density and distribution function that I want to plot in a meaningful way, (i.e., want to be able to see how the functions behaves as changes in x and y happen simultaneously. If ...
2k views

### What is the average of rolling two dice and only taking the value of the higher dice roll?

I am referencing to this question on mathunderflow: What is the average of rolling two dice and only taking the value of the higher dice roll? Now I tried: ...
497 views

### ConditionalEntropy and StatisticsLibraryNConditionalEntropy

There is a function available from the Statistics`Library context called NConditionalEntropy that appears to compute ConditionalEntropy. Thus ... ...
2k views

### Plotting 2D Data with Categorical Data in One of the Dimensions

I have a 2D data set in the form of: data={{Category, Integer}, {Category, Integer},{Category, Integer}...} It is a pretty simple data set with four categories ...
1k views

### Efficient Generation of Random Variates from a Copula Distribution

I have a 7-asset portfolio for which I want to simulate daily log-deltas using a Student T copula. The marginal distributions are all either Stable or TsallisQGaussian. Using NMaximize, I have ...