Tagged Questions

Questions on the statistical functions of Mathematica.

1k views

Plot Ellipse based on EigenSystem

Please consider the following : ...
631 views

Creating word histograms from lists of strings

Consider the following: ...
511 views

BoxWhiskerChart with logarithmic axes

I would like to make a following chart Ideally I would also like to control the boxes position on a logarithmic x-axis. Some inspiration how to do the latter may be found in the answer to my ...
989 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.
255 views

Overlay of pdf using PairedHistogram in Mathematica

With a standard 1D histogram, I can generate a pdf overlay using Show and Plot. I'd like to do something similar with ...
335 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 ...
233 views

Better way to get Fisher Exact?

I want to perform a Pearson's $\chi^2$ test to analyse contingency tables; but because I have small numbers, it is recommended to perform instead what is called a Fisher's Exact Test. This requires ...
701 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 ...
147 views

How to derive SinglePredictionBands from a NonlinearModelFit model

I have found NonlinearModelFit to be extremely useful in my work. Here I have fit 4 points to a function and am being asked to explain how the 95% SinglePredictionBands associated with the plot below ...
492 views

Estimation of vector autoregressive (VAR) process

To estimate 1-dimensional VAR process (which is AR process) you can easily use functions EstimatedProcess or ...
991 views

Grain(Particle) Size Distribution (PSD) Analysis with Mathematica

I would like to do an analysis of the grain size distribution of a Monte Carlo Grain Growth simulation I implemented based on the nice example by Rituraj Nandan (see Link). The result of this ...
308 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 ...
3k 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 ...
150 views

Expected sum of largest 3

I pick 4 numbers from the Uniform Distribution. I need the expected value of the sum of the 3 largest. I am pretty sure that the answer is 9 / 5 which agrees with a simulation. I would like to get ...
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 ...
548 views

I would like to calculate the following with Mathematica: Let $X$ be a random variable with probability function $$p(x)= \left\{ \begin{matrix} \frac{x}{6} & \text{for }x \in \{1,2,3\}\\ 0 ... 1answer 276 views Obtaining standardised regression coeffiecients Regression coefficients are the constant that indicate the rate of change in one variable as a function of change in another. Standardised regression coefficients are the same, but refer to a change ... 2answers 142 views Best way to represent a joint distribution The motivation for this question is producing a distribution that produces the gender and age of an individual when the distribution of ages depends on gender. Suppose I want a distribution which, ... 1answer 690 views How do I calculate Standard Deviation confidence intervals in Mathematica? I have a series of simulation results and I would like to demonstrate how the confidence interval for the mean and standard deviation decrease as the number of results increases. I have done this for ... 1answer 316 views Representative Smooth Kernel Distribution from Truncated Distribution I am trying to produce a better distribution from a dataset that is bounded to be greater than 0. Here is an example distribution from the documentation that mimics the behavior of the actual dataset: ... 1answer 574 views Inconsistency in Histogram's “Probability” Binsize Context Let me define a Probability distribution (following the documentation and with some connection to this question) ... 4answers 323 views Conditional Expectation — How can Mathematica find a more general closed form? Mathematica can't find a solution to this Expectation. ... 2answers 1k 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 ... 1answer 398 views Fix end point in smooth kernel distribution density I am using some extreme value fitting method which results in a parametric distribution for values exceeding some threshold, all values \geq 0. For smaller values I'd like to use a smooth kernel ... 1answer 398 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 ... 0answers 506 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 ... 4answers 3k views Function for Autocorrelation Is there a built in function to compute the autocorrelation of a signal ? 4answers 306 views How to plot frequency polygon? I have data sample. Built and plotted histogram based on the sample. How can I plot frequency polygon now? That's example of the desired result. Here is code: ... 2answers 4k 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: ... 2answers 1k 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 ... 3answers 287 views How to find max difference with the same x between two functions? For example, I have function TF[y_] = 2 / Pi * ArcSin[y] And I have CDF: ... 1answer 774 views Is there a free version of the Springer book “Mathematical Statistics with Mathematica”? Is there a free version of the Springer book:$$\text{Mathematical Statistics with Mathematica}$$by Rose and Smith ... available on the internet? 1answer 1k views Hodrick–Prescott filter (one-sided version) I am interested in implementing Hodrick–Prescott filter (HP filter) on my time series data in Mathematica. I know that there is already a version of two-sided original filter for Mathematica (see ... 3answers 375 views Creating Correlation Table (and Working) With Missing Data I am working with data that contains missing values (I have several variables (across the columns) and several observations (across the rows) in an excel spreadsheet). Example of the data structure: ... 4answers 508 views Identifying subsets with minimal standard deviation Consider the following: ... 2answers 374 views what is The Formula behind the Kolmogorov-Smirnov test statistics? I calculate the Kolmogrov-samirnov test statistic for the following data: ... 2answers 185 views Getting the Cumulative Distribution Function of f(x) from a dataset of x I've a data set \mathcal{X} which consists of randomly generated numbers. Let's say for example data = RandomVariate[ExponentialDistribution[1], 10^4]; My aim ... 2answers 540 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 ... 1answer 293 views BoxWhiskerChart - 10-90th percentile instead of min - max I am trying to draw a custom BoxWhiskerChart with alternative values determining fences. I have data that has a lot of outliers and I have to compare it to another chart that has 10-90th percentile ... 1answer 170 views Reverse engineer a sample value from a CDF The image below shows the cumulative distribution of a normal distribution with mean = 4 and standard deviation = 1. Notice that if you have a value with a rank of 0.8 (meaning it would be 80th item ... 2answers 606 views Fitting data to an ARProcess using FindProcessParameters I have 50 data points that I would like to represent as an AR(4) process. I'd like to over-plot the behaivor of the estimated process model with that of the original (raw) data before I use the model ... 1answer 831 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 ... 1answer 84 views How to formally tell if one time series affects another? In time series analysis, a correlogram, also known as an autocorrelation plot, is a plot of the sample autocorrelations. I'm rolling my own now and I'm not a statistician, but I think this sort of ... 1answer 192 views Simulation Sample Paths for Stochastic Approximation Algorithm Let X_t be IID random variables in [0,1] and CDF F(\cdot). Suppose there exists a variable Y_t given by: Y_1 = X_1 and Y_t = \phi(X_t, \overline{Y}_{t-1}), \forall t >1, where ... 1answer 526 views How can we create a histogram distribution from binning data? HistogramDistribution takes a list of data points, creates a histogram from them, and returns this histogram in a form that can be used as a distribution. I ... 1answer 149 views PearsonChiSquareTest: set degrees of freedom How to set degrees of freedom for PearsonChiSquareTest? I have this: ... 1answer 80 views Actual bins used for Pearson Chi Square Test PearsonChiSquareTest[data, dist] computes bins for data as a step towards calculating the test statistic. For continuous ... 2answers 307 views Numerical Integration with InverseErfc I am trying to numerically integrate an equation that involves InverseErfc (embedded in the copula defined). The equation looks like the following:$$ \int_0^T \int_0^\infty \int_0^\infty ...
I am trying to get what I call a "$\chi^2$ fit". This means taking a function $f(x,p)$ of the variable $x$ with a parameter $p$ and finding the value of $p$ that minimizes the "distance" from a data ...