# Tagged Questions

Questions on the statistical functions of Mathematica.

329 views

### BUGS-type calculations in Mathematica

Recently I have been teaching myself how to Bayesian calculations with the BUGS language (JAGS, in particular). However, I find myself wondering how one might use Mathematica to do similar ...
404 views

### How to fit one distribution to another?

I have a custom distribution created to model some experimental observations. While too complicated to include in this question, I can provide an example and some illustrations to convey a sense of ...
486 views

### Clustering a bivariate data set with Mathematica

I need to partition a bivariate data set into predetermined "n" clusters and, at the same time, to fix the centroid position of each cluster. Is the ...
973 views

### Obtaining joint distributions and conditional distributions using Mathematica

I have two multivariate Gaussian distributions $p(x)$ and $p(z)$ with mean vectors $m_x$ and $m_z$, and covariance matrices $\Sigma_x$ and $\Sigma_z$. my model is a simple linear model $x = W z+n$ ...
827 views

### Probability and distribution from actual data

Let's say I have some data from a real world system: ...
264 views

### Calculating the Mean of a Truncated Multinormal Distribution

First, I'm a little disappointed that Mathematica balks at: Mean[TruncatedDistribution[{{0, Infinity}},MultinormalDistribution[{0}, {{1}}]]] Second, is the ...
819 views

### How can I tell mathematica to generate an histogram from nominal data?

If I write: Histogram[{1, 1, 1, 2, 2, 2}] I get a nice histogram chart but if I write ...
150 views

### How to change type order in PearsonDistribution?

I need to estimate a Pearson distribution from a batch of tables tab: ...
267 views

### Polynomial expectations of generic distributions

Summary Polynomial expectations depend only moments and cross moments of a multivariate distribution. I would like to use Expectation to compute polynomial ...
527 views

### Detecting and counting signals in list data: checking pulse rate

Hope this isn't too much of a basic question: I'm looking for some Mathematica functions, but I don't know which ones. Background I recently read about a simple technique for reading your body's ...
1k views

### Persistence length of a polymer chain

I'm trying to calculate the persistence length (Lp) of a polymer chain using Mathematica. The first and simplest method is to compare the EuclideanDistance between ...
110 views

### NExpectation not up to expectations with Boole or Conditioned

Context I am interested in computing numerically the number of extrema at a given threshold for random fields. These numbers are expectations of MultinormalDistributions. Problem This integral ...
182 views

### How does bandwidth selection work for low-variance dimensions with KernelMixtureDistribution?

I am puzzled because this toy example (in Mathematica 8) ...
370 views

### Sensitivity Analysis: Global Sensitivity and Screening

I have a model which accepts several input parameters and now I want to study the sensitivity to certain parameters as described in here: Cross Validated Answer and in Wikipedia. There is also a link ...
268 views

### WinBUGS Interface

Has anyone created on WinBUGS (Bayesian inference Using Gibbs Sampling) interface with Mathematica similar to BugsXLA for Excel? I'd like to setup the model, define the evidence in a notebook and then ...
188 views

### Expectation over a list with nested-mapped expressions

I need expected values of a list where the random variable to take expectations over should be an input into expressions defined earlier. I suspect Set[] and SetDelayed[] tripped me. (Or Map and ...
227 views

### How to Compute Aggregate Best and Worst Cases for a Large Number of Estimates?

I need to aggregate multiple estimations, but I haven't been able to find a built-in function in Mathematica that aggregates multiple probablity estimations (I am specially interested in estimations ...
446 views

### Using ANOVA with a “Repeated measures” / “Within-subjects” design

Repeated measures designs or "Within-Subjects" designs are very important in live sciences and social sciences. Unfortunately, Mathematica's ANOVA package is not able to analyze those designs. It only ...
311 views

### Support for Multidimensional Scaling (MDS)?

Does mathematica support MDS? Or, are there any libraries that support it? Basically, I have points and a distance function defined between them, and I want to plot them in 2D space, trying to ...
451 views

### Different calculation of median and quartiles, bug in BoxWhiskerChart?

When you plot a dataset with BoxWhiskerChart passing over the box in the plot with your mouse pointer shows some specifics about the dataset (min and max values, ...
649 views

### What is the Mathematica equivalent for the Excel function tinv()?

TINV() returns the t-value of the Student's t-distribution as a function of the probability and the degrees of freedom. For example ...
2k views

### Standard errors for maximum likelihood estimates in FindDistributionParameters

I am trying to fit a non-standard PDF to data and FindDistributionParameters works great, and gives me the parameters of the distribution back using maximum ...
494 views

### Bayesian Inference with Continuous prior distribution

Assume that we have a prior distribution for the probability of success as follows. p = BetaDistribution[6, 14] which we can graph as this ...
491 views

### How to augment the realm of functions Mathematica thinks it knows how to integrate symbolically

My question involves extending the functionality of Integrate over specific integrals in the most generic manner. Specifically, is it possible to "hack into" ...
2k views

### Performing a chi-square goodness of fit test

How would I perform a chi-square goodness of fit test? I have tried the following, where my data consists of the observed values whilst the data pair contains the correct values. Then I use the ...
811 views

### Wald–Wolfowitz Runs Test

Does Mathematica 8 implement Wald–Wolfowitz runs test for randomness? I can't find it in the documentation. I would like to test some fit residuals.
168 views

### NExpectation behaves oddly with EmpiricalDistribution

Note: this is fixed in version 9. My question concerns the usage of NExpectation and Expectation and why I see the behavior I ...
2k views

### Doing a chi-square independence test in Mathematica

I have a matrix consisting of the following data: Needs["HypothesisTesting`"] data = {{11, 206}, {32, 1374}} How would I make a chi-square independence test ...
257 views

### Non-linear trend reduction with missing data

How can I reduce a non-linear trend of some data series if there are parts of "no data", represented by the value 99999? For example: ...
316 views

### What do the options of SmoothKernelDistribution do?

The function SmoothKernelDistribution has three options that are not described in too much detail in the Mathematica's help window. InterpolationPoints: What is ...
462 views

### Creating word histograms from lists of strings

Consider the following: ...
2k views

### Efficiently generating n-D Gaussian random fields

I am interested in an efficient code to generate an $n$-D Gaussian random field (sometimes called processes in other fields of research), which has applications in cosmology. I wrote the following ...
298 views

### How can an InverseQuantile or an interval valued Quantile function be implemented in Mathematica?

Quantile[] is the workhorse method in robust data analysis and statistics (see, eg Koenker's Quantile Regression). However, it should be complemented by an ...
437 views

### Identifying subsets with minimal standard deviation

Consider the following: ...
382 views

### Random variables with transformed discrete distributions cannot be applied to Probability[] function?

I have two discrete uniform distributions over same support: Dx = DiscreteUniformDistribution[{-8, 8}]; Dy = DiscreteUniformDistribution[{-8, 8}]; I use ...
223 views

### What default theoretical distribution does Mathematica use in PearsonChiSquareTest?

I used Mathematica's function PearsonChiSquareTest to test whether the data were drawn from a normal distribution. As in the reference, I expected Mathematica to compare the result to a normal ...
628 views

### Is there a function to calculate studentized range?

Is there a built-in function for studentized range or do I have to build it myself? Is there a test of normality for the studentized range?
2k views

### Histograms with pre-counted data

I've got some large data sets which have been counted but not binned already - essentially, a list of pairs of values (not bins) and counts.* (Or, equivalently, it's been binned into too-small bins.) ...
567 views

### How do I calculate the probability of reaching mean residual life

I need to understand the Survival Analysis concept of "mean residual life (MRL)" and calculating probabilities for reaching it. From another discussion: The MRL at time t is the mean additional ...
379 views

### Cluster analysis returns questionable results

A few weeks ago I ran a cluster analysis on some economic data and (unfortunately only) now I found out that some results do not make sense. For instance I analyzed the development of unemployment ...
2k views

### Function to compute the probability of exactly one event occurring out of N independent events

Is there a built in function (or a function in one of the standard packages) that allows you to compute the probability of exactly one event occurring out of some known set of probabilities for N ...
275 views

### RandomVariate with a Discrete Distribution

Nature has provided me with a random variable $Z$ taking on the values $0, 1, 2, \ldots$, with probabilities $z_0, z_1, \cdots$. I can sample from the distribution of $Z$ reasonably efficiently (I ...
483 views

### Most efficient way to obtain samples from high-dimensional multivariate distributions?

Is MultinormalDistribution[] efficient and easy to use for high dimensions? I have a variable $n$ representing the dimension of a Monte Carlo integration I do on a ...
576 views

### How to solve for an Z-Score of a T-Distribution?

I'm looking for the Z-Score for a distribution, where the integrated area sums up to 0.90. Unfortunately I always get an error from Mathematica, ...
3k views

### Showing the correlation of two variables using a plot

I have a list of $\{x_i,y_i\}$ pairs and I want to show that $x_i$'s and $y_i$'s have positive correlation. The result of ...
2k views

### Function for Autocorrelation

Is there a built in function to compute the autocorrelation of a signal ?
579 views

### Measure a DensityHistogram[] pair similarity

I study human vision and more specifically eye-movements. "If we display 2 symmetrical patterns (20 min one after the other), will our gaze distribution be symmetric is my research question." The 2 ...
504 views

### How to define a new copula distribution family

The function CopulaDistribution can be used with the most well known kernels. I was wondering how I can add a new family of kernels in a way that it works in the ...
Suppose $(X,Y)$ has a bivariate t distribution. I want to plot the density of the conditional density of $Y$ given $X$, i.e. $Y|X$. I wonder why the following does not work: ...