Questions on the statistical functions of Mathematica.

learn more… | top users | synonyms

11
votes
3answers
173 views

How to efficiently find moments of a multinormal distribution?

I have a multinormal distribution with covariance matrix $\sigma$ and zero mean. I want to find moment $$ E[x_1^{r_1}x_2^{r_2}\cdots x_n^{r_n}] =\,? $$ Of course, there is a build-in function ...
0
votes
1answer
100 views

Understanding distribution chart

How to explain DistributionChart function in mathematica, For example: if I have ...
-3
votes
3answers
164 views

Statistical analysis of a data file and its Plot [closed]

As the title says, I have an external data file which contains thousands lines of data. The data file contains eight columns and here is what I would like to plot: Let's assume that the length of the ...
6
votes
2answers
646 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 ...
0
votes
0answers
111 views

Discrete distribution binomial set up

I hope one of you guys can help me out. I am trying to visualize a discrete distribution based on a binomial distribution and a mixed binomial distribution. In the first step I started to determine ...
5
votes
1answer
104 views

PearsonChiSquareTest: set degrees of freedom

How to set degrees of freedom for PearsonChiSquareTest? I have this: ...
0
votes
1answer
103 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 ...
4
votes
1answer
137 views

Defining five-parameter Pearson distribution by moments

How do you derive (or where can I find a derivation of) the equations to match the five parameters of a general Pearson distribution to a mean, variance, skewness, kurtosis, and condition that the ...
3
votes
3answers
264 views

Log-log scale smooth histogram

How can I create a smooth histogram with a log-log scale? I can use Histogram[data, "Log", "LogCount"] to get a log-log histogram, or I can use ...
3
votes
1answer
105 views

How to Use ProbabilityScalePlot with Censored Data?

I am trying to reproduce a ProbabilityScalePlot of censored data shown here (see Sample Analysis Plot). Here is my Mathematica code. First I deal with the uncensored case. ...
6
votes
1answer
400 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 ...
2
votes
1answer
128 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 ...
5
votes
1answer
391 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 ...
1
vote
1answer
152 views

SinglePredictionBands versus MeanPredictionBands from NonlinearModelFit

From my Statistics lectures I know the term confidence and prediction interval, whereas the confidence interval is smaller than the prediction interval. If I plot the mean and single prediction bands ...
3
votes
4answers
201 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 ...
4
votes
1answer
315 views

Using DistributionFitTest on custom distributions in Mathematica 8

I originally posted this question on Stack Overflow, but I didn't get any answers, and I'm hoping to have better luck here. I'm trying to compute the goodness-of-fit of a bi-modal Gaussian ...
2
votes
1answer
86 views

Confidence level for Binomial

For 617519 first time births there were 317528 boys. Give an estimate with 99% confidence interval for the probability that the first time birth is a boy. I have searched for the confidence ...
1
vote
1answer
123 views

Value for x such that |(x-y)| is minimum

I have a list Y={y1,y2,y3,...,yn} And I would need to find x such that Abs[x-Y[[i]]] for all $y_i$ in $Y$ is minimum. ...
6
votes
3answers
352 views

Calculate probability function

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 ...
12
votes
1answer
176 views

Randomness test suites that can be invoked from Mathematica

There are several test suites referenced at csrc.nist.gov designed to test a (pseudo-)random byte sequence for randomness, and discover possible skews, correlations, patterns, or other hidden ...
4
votes
2answers
283 views

How to make a conditioning plot?

I'd like to make a conditioning plot just like coplot in R. Is there a pre-made solution or do I have to make a bunch of plots individually? Edit: This is an example from r screenshots. It is a way ...
0
votes
0answers
401 views

How to Output Chi-Squared Statistics when using NonLinearModelFit

I am using NonLinearModelFit for some curve fitting and I was wondering if NLM is able to output chi-squared/leastsquared statistics from the best-fit parameters and confidence intervals. From my ...
0
votes
1answer
118 views

plot probability

Hi I just want to flatten a function, I tied it with Joined->True, but it did not work, hope somebody of you can help me. This is my code: ...
2
votes
1answer
198 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 ...
-1
votes
1answer
220 views

How to find Mode of a list [closed]

I want to find the mode (i.e. most frequent element) of a list of values. I saw some example with distributions but I'm working with lists that contain numbers. Suppose that I have a lits like: ...
2
votes
0answers
45 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. ...
0
votes
0answers
89 views

Binomial Distribution (binomial model inspired by Merton)

Binomial Distribution (binomial model inspired by Merton) Hi I want to do the following and I hope that anyone of you can help me out. In short, I have a portfolio consisting of 10 companies, ...
17
votes
1answer
325 views
0
votes
2answers
481 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 ...
1
vote
0answers
151 views

Simulations with MonteCarlo and Autoregressive methods

I am trying to find the best-fit trend for my data. Here I just generated it but let's say I don't know my data trend at all. ...
1
vote
0answers
459 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 ...
1
vote
1answer
260 views

Computing Correlations and p-values

I have two vectors $A$ and $B$ of length (say) $50$ or so, and I want to determine whether there is any correlation between their entries. I computed their correlation directly and found it to be ...
1
vote
0answers
55 views

Changing GeometricBrownianMotionProcess function

Since the function GeometricBrownianMotionProcess is given by Mathematica I have some technical questions. If we consider the following example: ...
8
votes
3answers
377 views

The default bandwidth of the SmoothKernelDistribution function

I am researching the Silverman rule of thumb for bandwidth selection. Below is a sample of my code, from which it seems that BW=63 is close to the default parameter given by Mathematica (2 images are ...
0
votes
0answers
352 views

Coefficient of determination (R squared) of EstimatedDistribution

I have estimated the distribution for a set of data as LogisticDistribution[3.5, 1.037]. How can I calculate and plot the coefficient of determination (R squared) ...
17
votes
3answers
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 ...
2
votes
2answers
170 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 ...
8
votes
2answers
464 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 ...
3
votes
1answer
324 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.
7
votes
3answers
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 ...
8
votes
1answer
187 views

CorrelationTest small bug?

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

AR(1) Process first term

I'm trying to generate a very simple AR(1) Process with Mathematica using the ARProcess[] function. The process must have the following format: $Y_t = \alpha + ...
9
votes
3answers
391 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, ...
10
votes
2answers
289 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 ...
1
vote
1answer
116 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 ...
15
votes
5answers
5k views

Estimate error on slope of linear regression given data with associated uncertainty

Given a set of data, is it possible to create a linear regression which has a slope error that takes into account the uncertainty of the data? This is for a high school class, and so the normal ...
1
vote
2answers
360 views

Probability density histogram with unequal bin widths

I am confused by output of Histogram and HistogramList for probability density ("PDF") when ...
2
votes
0answers
492 views

Calculate variance of random walk?

How can I symbolically calculate the variance of the following random walk in Mathematica? Given several discrete random variables such that $p(Z_i=1-2k)=p$, where $k$ is a small real number, and ...
7
votes
1answer
205 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 ...
1
vote
0answers
249 views

Matrix algebra vs. PrincipalComponents and Varimax/Oblimin

Using matrix algebra I can calculate loadings and scores from the covariance matrix (data matrix is column centered): ...