instruction
stringlengths
35
38.7k
The 'fundamental' idea of statistics for estimating parameters is maximum likelihood. I am wondering what is the corresponding idea in machine learning. Qn 1. Would it be fair to say that the 'fundamental' idea in machine learning for estimating parameters is: 'Loss Functions' [Note: It is my impression that machine le...
Suppose there is a very big (infinite?) population of normally distributed values with unknown mean and variance. Suppose also that we have a sample, S, of n values from the entire population. We can calculate mean and standard deviation for this sample (we use n-1 for stdev calculation). The first and most important q...
I am struggling a little bit at the moment with a question related to logistic regression. I have a model that predicts the occurrence of animal based on land cover with reference to forest. I am not grasping the concept of a reference class and struggle to extrapolate the model onto a new area. Any explanations or gui...
What is the difference between offline and online learning? Is it just a matter of learning over the entire dataset (offline) vs. learning incrementally (one instance at a time)? What are examples of algorithms used in both?
I am interested in tools/techniques that can be used for analysis of streaming data in "real-time"*, where latency is an issue. The most common example of this is probably price data from a financial market, although it also occurs in other fields (e.g. finding trends on Twitter or in Google searches). In my experienc...
I'm trying to separate two groups of values from a single data set. I can assume that one of the populations is normally distributed and is at least half the size of the sample. The values of the second one are both lower or higher than the values from the first one (distribution is unknown). What I'm trying to do is t...
Comparing two variables, I came up with the following chart. the x, y pairs represent independent observations of data on the field. I've doen Pearson correlation on it and have found one of 0.6. My end goal is to establish a relationship between y and x such that y = f(x). What analysis would you recommend to obtain ...
I completed a Monte Carlo simulation that consisted of one million ($10^6$) individual simulations. The simulation returns a variable, $p$, that can be either 1 or 0. I then weight the simulations based on predefined criteria and calculate the probability of $p$. I also calculate a risk ratio using $p$: $$\text{Risk ra...
For 1,000,000 observations, I observed a discrete event, X, 3 times for the control group and 10 times for the test group. How do I determine for a large number of observations (1,000,000), if three is statistically different than ten?
What are some podcasts related to statistical analysis? I've found some audio recordings of college lectures on ITunes U, but I'm not aware of any statistical podcasts. The closest thing I'm aware of is an operations research podcast The Science of Better. It touches on statistical issues, but it's not specifically ...
This one is bothering me for a while, and a great dispute was held around it. In psychology (as well as in other social sciences), we deal with different ways of dealing with numbers :-) i.e. the levels of measurement. It's also common practice in psychology to standardize some questionnaire, hence transform the data i...
How comprehensive is the following book - What interpretations are missing? Interpretations of Probability, Andrei Khrennikov, 2009, de Gruyter, ISBN 978-3-11-020748-4 http://www.degruyter.com/cont/fb/ma/detailEn.cfm?isbn=9783110207484&sel=pi Contents:http://www.degruyter.com/files/pdf/9783110207484Contents.pdf
Is the Yates' correction for continuity used only for 2X2 matrices?
I've been beginning to work my way through Statistical Data Mining Tutorials by Andrew Moore (highly recommended for anyone else first venturing into this field). I started by reading this extremely interesting PDF entitled "Introductory overview of time-series-based anomaly detection algorithms" in which Moore traces...
When I type a left paren or any quote in the R console, it automatically creates a matching one to the right of my cursor. I guess the idea is that I can just type the expression I want inside without having to worry about matching, but I find it annoying, and would rather just type it myself. How can I disable this fe...
New to the site. I am just getting started with R, and want to replicate a feature that is available in SPSS. Simply, I build a "Custom Table" in SPSS with a single categorical variable in the column and many continuous/scale variables in the rows (no interactions, just stacked on top of each other). The table rep...
Take $x \in \{0,1\}^d$ and $y \in \{0,1\}$ and suppose we model the task of predicting y given x using logistic regression. When can logistic regression coefficients be written in closed form? One example is when we use a saturated model. That is, define $P(y|x) \propto \exp(\sum_i w_i f_i(x_i))$, where $i$ indexes set...
What is the relationship between a Nonhomogeneous Poisson process and a process that has heavy tail distribution for its inter arrival times? Any pointer to a resource that can shed some light on this question would be hugely appreciated
Context I have a survey of 16 questions, each with four possible responses. The purpose of the survey is to measure the respondent's propensity towards four categories (which we will denote A, B, C, D). Each of the four responses per question are representative of an aspect of the four categories, A, B, C, D. The respo...
Just wonder, is there any data analysis/ statistic/ data mining work that are available on freelance basis? This could be subjective and argumentative, which is why I put it as CW.
I have a dataset made up of elements from three groups, let's call them G1, G2, and G3. I analysed certain characteristics of these elements and divided them into 3 types of "behaviour" T1, T2, and T3 (I used cluster analysis to do that). So, now I have a 3 x 3 contingency table like this with the counts of elements in...
So in R, for instance, this would be: my_ts_logged_diffed = diff(log(some_ts_object)) plot(my_ts_logged_diffed) This seems to be part of every experienced analyst/forecaster analytical workflow--in particular, a visual examination of the plotted data. What are they looking for--i.e., what useful information does this ...
What are the freely available data set for classification with more than 1000 features (or sample points if it contains curves)? There is already a community wiki about free data sets: Locating freely available data samples But here, it would be nice to have a more focused list that can be used more conveniently, also...
When we are monitoring movements of structures we normally install monitoring points onto the structure before we do any work which might cause movement. This gives us chance to take a few readings before we start doing the work to 'baseline' the readings. Quite often the data is quite variable (the variations in the ...
I haven't studied statistics for over 10 years (and then just a basic course), so maybe my question is a bit hard to understand. Anyway, what I want to do is reduce the number of data points in a series. The x-axis is number of milliseconds since start of measurement and the y-axis is the reading for that point. Often...
I have distributions from two different data sets and I would like to measure how similar their distributions (in terms of their bin frequencies) are. In other words, I am not interested in the correlation of data point sequences but rather in the their distributional properties with respect to similarity. Currently I...
A colleague wants to compare models that use either a Gaussian distribution or a uniform distribution and for other reasons needs the standard devation of these two distributions to be equal. In R I can do a simulation... sd(runif(100000000)) sd(runif(100000000,min=0,max=2)) and see that the calculated standard devia...
I am trying to calculate the reliability in an elicitation exercise by analysing some test-retest questions given to the experts. The experts elicited a series of probability distributions which were then compared with the true value (found at a later date) by computing the standardized quadratic scores. These scores a...
I've got a linear regression model with the sample and variable observations and I want to know: Whether a specific variable is significant enough to remain included in the model. Whether another variable (with observations) ought to be included in the model. Which statistics can help me out? How can get them most ef...
Introductory, advanced, and even obscure, please. Mostly to test myself. I like to make sure I know what the heck I'm talking about :) Thanks
I am comparing two distributions with KL divergence which returns me a non-standardized number that, according to what I read about this measure, is the amount of information that is required to transform one hypothesis into the other. I have two questions: a) Is there a way to quantify a KL divergence so that it has a...
Consider the following model $Y_i = f(X_i) + e_i$ from which we observe n iid data points $\left( X_i, Y_i \right)_{i=1}^n$. Suppose that $X_i \in \mathbb{R}^d$ is a $d$ dimensional feature vector. And suppose that a ordinary least squares estimate is fit to data, that is, $\hat \beta = {\rm arg} \min_{\beta \in \math...
The wiki article on credible intervals has the following statement: credible intervals and confidence intervals treat nuisance parameters in radically different ways. What is the radical difference that the wiki talks about? Credible intervals are based on the posterior distribution of the parameter and confidence in...
I'm comparing a sample and checking whether it distributes as some, discrete, distribution. However, I'm not enterily sure that Kolmogorov-Smirnov applies. Wikipedia seems to imply it does not. If it does not, how can I test the sample's distribution?
my question particularly applies to network reconstruction
I am looking for a good book/tutorial to learn about survival analysis. I am also interested in references on doing survival analysis in R.
What is the equivalent command in R for the stcox command in Stata?
I'll use an example so that you can reproduce the results # mortality mort = ts(scan("http://www.stat.pitt.edu/stoffer/tsa2/data/cmort.dat"),start=1970, frequency=52) # temperature temp = ts(scan("http://www.stat.pitt.edu/stoffer/tsa2/data/temp.dat"), start=1970, frequency=52) #pollutant particulates part = ts(scan...
In general inference, why orthogonal parameters are useful, and why is it worth trying to find a new parametrization that makes the parameters orthogonal ? I have seen some textbook examples, not so many, and would be interested in more concrete examples and/or motivation.
My stats has been self taught, but a lot of material I read point to a dataset having mean 0 and standard deviation of 1. If that is the case then: Why is mean 0 and SD 1 a nice property to have? Why does a random variable drawn from this sample equal 0.5? The chance of drawing 0.001 is the same as 0.5 so this should...
My question is actually quite short, but I'll have to start by describing the context since I am not sure how to directly ask it. Consider the following "game": We have a segment of length n ("large segment") and m integers ("lengths"), all considerably smaller than n. For each of the m lengths we draw a random sub-se...
I have been reading Zuur, Ieno and Smith (2007) Analyzing ecological data, and on page 262, they try to explain how nMDS (non-metric multidimensional scaling) algorithm works. As my background is in biology and not math or statistics per se, I'm having hard time understanding a few points and would ask you if you could...
I am trying to assess the significance of the obtained MI matrix. The initial input was a array of 3000 genes by 45 timepoints. MI was computed resulting in a array of 3600 by 3600. I am thus comparing my results to a shuffled matrix with the same dimensions. I permutate the columns 100 times, thus have 100 results fo...
I'm trying to visualize a set of data that represents human body mass over time, taken from (usually) daily weighings. Because body mass tends to fluctuate +/- 3 pounds based on hydration I would like to draw a strongly smoothed line graph to minimize the fluctuation. Any help on what the equation would look like is mu...
I'm looking for a distribution to model a vector of $k$ binary random variables, $X_1, \ldots, X_k$. Suppose I have observed that $\sum_i X_i = n$. In this case I do not want to treat them as independent Bernoulli random variables. Instead, I would like something like the multinomial: $P(X_1=x_1, \ldots, X_k=x_k) = ...
This question concerns an implementation of the topmoumoute natural gradient (tonga) algorithm as described in page 5 in the paper Le Roux et al 2007 http://research.microsoft.com/pubs/64644/tonga.pdf. I understand that the basic idea is to augment stochastic gradient ascent with the covariance of the stochastic gradi...
I am working on disease infection data, and I am puzzled on whether to handle the data as "categorical" or "continuous". "Infection Count" the number of infection cases found in a specific period of time, the count is generated from categorical data (i.e. no. of patient tagged as "infected") "Patient Bed Days" ...
I want to represent a variable as a number between 0 and 1. The variable is a non-negative integer with no inherent bound. I map 0 to 0 but what can I map to 1 or numbers between 0 and 1? I could use the history of that variable to provide the limits. This would mean I have to restate old statistics if the maximum incr...
I have computed percentage change from time1 to time2 for several variables. Can I predict percentage change in earnings from percentage change in produced and percentage changed in price? When I ran a model with actual data and dummy coded time (time1=1, time2=0), the dummy variable was not statistically significant. ...
In many papers I see data representing a rate of success (i.e a number between 0 and 1) modeled as a gaussian. This is clearly a sin (the range of variation of the gaussian is all of R), but how bad is that sin? Under what assumptions would you say it is tolerable?
Joshua Epstein wrote a paper titled "Why Model?" available at http://www.santafe.edu/media/workingpapers/08-09-040.pdf in which gives 16 reasons: Explain (very distinct from predict) Guide data collection Illuminate core dynamics Suggest dynamical analogies Discover new questions Promote a scientific habit of mind Bou...
I have data for about 1 year, 100 observations, multiple observations per subject, transactions occur on weekly basis but have 6-12 subjects per week, there is no order to this. There is a policy change in latter half of year, I want to model change in dependent variable due to policy change as a dummy variable: time1=...
I have cross classified data in a 2 x 2 x 6 table. Let's call the dimensions response, A and B. I fit a logistic regression to the data with the model response ~ A * B. An analysis of deviance of that model says that both terms and their interaction are significant. However, looking at the proportions of the data, it l...
I am working with a large amount of time series. These time series are basically network measurements coming every 10 minutes, and some of them are periodic (i.e. the bandwidth), while some other aren't (i.e. the amount of routing traffic). I would like a simple algorithm for doing an online "outlier detection". Basica...
The wiki discusses the problems that arise when multicollinearity is an issue in linear regression. The basic problem is multicollinearity results in unstable parameter estimates which makes it very difficult to assess the effect of independent variables on dependent variables. I understand the technical reasons behind...
R allows us to put code to run in the beginning/end of a session. What codes would you suggest putting there? I know of three interesting examples (although I don't have "how to do them" under my fingers here): Saving the session history when closing R. Running a fortune() at the beginning of an R session. I was think...
When solving business problems using data, it's common that at least one key assumption that under-pins classical statistics is invalid. Most of the time, no one bothers to check those assumptions so you never actually know. For instance, that so many of the common web metrics are "long-tailed" (relative to the normal ...
I'm looking to check my logic here. Say you measure a quantity in group A, and find the mean is 2 and your 95% confidence interval ranges from 1 to 3. Then you measure the same quantity in group B and find a mean of 4 with a 95% confidence interval that ranges from 3.5 to 4.5. Assuming that A & B are independent, what...
In my area of research, a popular way of displaying data is to use a combination of a bar chart with "handle-bars". For example, The "handle-bars" alternate between standard errors and standard deviations depending on the author. Typically, the sample sizes for each "bar" are fairly small - around six. These plots se...
I know of normality tests, but how do I test for "Poisson-ness"? I have sample of ~1000 non-negative integers, which I suspect are taken from a Poisson distribution, and I would like to test that.
Could you recommend an introductory reference to index decomposition analysis, including different methods (e.g. methods linked to the Laspeyre index and methods linked to the Divisa index) properties of decomposition methods which can be used to compare the different methods implementations of methods, e.g. in R?
Back in April, I attended a talk at the UMD (University of Maryland) Math Department Statistics group seminar series called "To Explain or To Predict?". The talk was given by Prof. Galit Shmueli who teaches at UMD's Smith Business School. Her talk was based on research she did for a paper titled "Predictive vs. Explana...
Many income surveys (especially older ones) truncate key variables, such as household income, at some arbitrary point, to protect confidentiality. This point changes over time. This reduces inequality measures associated with the variable. I am interested in fitting a Pareto tail to the truncated distribution, replacin...
The question in short: What methods can be used to quantify distributional relationships between data when the distribution is unknown? Now the longer story: I have a list of distributions and would like to rank them based on their similarity to a given base-line distribution. Correlation jumps into my mind in such a c...
I want to perform a two-sample T-test to test for a difference between two independent samples which each sample abides by the assumptions of the T-test (each distribution can be assumed to be independent and identically distributed as Normal with equal variance). The only complication from the basic two-sample T-test ...
This post is the continuation of another post related to a generic method for outlier detection in time series. Basically, at this point I'm interested in a robust way to discover the periodicity/seasonality of a generic time series affected by a lot of noise. From a developer point of view, I would like a simple inter...
I have a list of sold items by size. Shoes in this case Size Qty 35 2 36 1 37 4 38 4 39 32 40 17 41 23 42 57 43 95 44 90 45 98 46 33 47 16 48 4 total: 476 I have to tell the owner how much of every size to buy. The problem is, I can't say him. - You should buy 95 shoes size 43 for every one of size ...
I'm looking for some robust techniques to remove outliers and errors (whatever the cause) from financial time-series data (i.e. tickdata). Tick-by-tick financial time-series data is very messy. It contains huge (time) gaps when the exchange is closed, and make huge jumps when the exchange opens again. When the exchang...
With data from two centres I want to account for potential heterogeneity or confounders between two centers. So the analysis will initially be stratified by clinical center and a chi square test performed with one degree of freedom. Is this appropriate with just two centres? Or is there an alternative?
I am using a control chart to try to work on some infection data, and will raise an alert if the infection is considered "out of control". Problems arrive when I come to a set of data where most of the time points have zero infection, with only a few occasions of one to two infections, but these already exceed the cont...
When would you tend to use ROC curves over some other tests to determine the predictive ability of some measurement on an outcome? When dealing with discrete outcomes (alive/dead, present/absent), what makes ROC curves more or less powerful than something like a chi-square?
How to find a non-trivial upper bound on $E[\exp(Z^2)]$ when $Z \sim {\rm Bin}(n, n^{-\beta})$ with $\beta \in (0,1)$? A trivial bound is obtained for substituting $Z$ with $n$. A background on this question. In the paper by Baraud, 2002 -- Non-asymptotic minimax rates of testing in signal detection, if one is to subst...
I was wondering if there is a statistical model "cheat sheet(s)" that lists any or more information: when to use the model when not to use the model required and optional inputs expected outputs has the model been tested in different fields (policy, bio, engineering, manufacturing, etc)? is it accepted in practice or ...
I'm trying to compute item-item similarity using Jaccard (specifically Tanimoto) on a large list of data in the format (userid, itemid) An item is considered as rated if i have a userid-itemid pair. I have about 800k users and 7900 items, and 3.57 million 'ratings'. I've restricted my data to users who have rated at ...
I have a colleague who calculates correlations in which one set of scores for a subject (e.g. 100 scores) is correlated with another set of scores for that same subject. The resulting correlation reflects the degree to which those sets of scores are associated for that subject. He needs to do this for N subjects. Cons...
Consider the following sequential, adaptive data generating process for $Y_1$, $Y_2$, $Y_3$. (By sequential I mean that we generate $Y_1$, $Y_2$, $Y_3$ in sequence and by adaptive I mean that $Y_3$ is generated depending on the observed values of $Y_1$ and $Y_2$.): $Y_1 = X_1\ \beta + \epsilon_1$ $Y_2 = X_2\ \beta + ...
Suppose I have a table of counts that look like this A B C Success 1261 230 3514 Failure 381 161 4012 I have a hypothesis that there is some probability $p$ such that $P(Success_A) = p^i$, $P(Success_B) = p^j$ and $P(Success_C) = p^k$. Is there some way to produce estimates for $p$, $i$, $j$ ...
The following question is one of those holy grails for me for some time now, I hope someone might be able to offer a good advice. I wish to perform a non-parametric repeated measures multiway anova using R. I have been doing some online searching and reading for some time, and so far was able to find solutions for only...
I am using Singular Value Decomposition as a dimensionality reduction technique. Given N vectors of dimension D, the idea is to represent the features in a transformed space of uncorrelated dimensions, which condenses most of the information of the data in the eigenvectors of this space in a decreasing order of importa...
If I have a (financial) time series, and I sample it with two different periods, at 5 and at 60 minute intervals, can I create an exponential moving average on the 5 minute sampled data which is the same as an exponential moving average on the 60 minute sampled data? Something like this: e1 = EMA(a1) applied on sampled...
I have a set of data which consists of many different types (measurable, categorical) For example: name measurable_attribute_1 categorical_attribute_1 measurable_attribute_2 categorical_attribute_2 ... Number of attributes may grows quite quickly during my study: into my spreadsheet, I can as many new entries a...
[0,1,0,2,4,1,0,1,5,1,4,2,1,3,1,1,1,1,0,1,1,0,2,0,2,0,0,1,0,1,2,2,1,2,4,1,4,1,0,0,4,1,0,1,0,1,1,2,1,1,0,0] What is the best way to convince myself that these data are correlated? that no univariate discrete distribution would approximate them well? that a time series model is necessary to better estimate the future dist...
(This is part-2 of my long question, you can have a look at part-1 here) I am going to do a quasi-experiment, with measuring the base line of a sample (actually not quite a sample, but a ward, with high patient turn-over rate), and then we do a intervention, and measure the variables (i.e. infection rate) again. I goog...
Sometimes I want to do an exact test by examining all possible combinations of the data to build an empirical distribution against which I can test my observed differences between means. To find the possible combinations I'd typically use the combn function. The choose function can show me how many possible combinati...
I am having difficulties to select the right way to visualize data. Let's say we have bookstores that sells books, and every book has at least one category. For a bookstore, if we count all the categories of books, we acquire a histogram that shows the number of books that falls into a specific category for that bookst...
Decision trees seems to be a very understandable machine learning method. Once created it can be easily inspected by a human which is a great advantage in some applications. What are the practical weak sides of Decision Trees?
My girlfriend (B.B.A) is really interested in Actuarial science. She's looking at self teaching her self. She's good with basic math (Calculus 1 and 2) and stats What are some of the essential sources she needs to read in order to learn and excel in the field?
I have detector which will detect an event with some probability p. If the detector says that an event occured, then that is always the case, so there are not false-positives. After I run it for some time, I get k events detected. I would like to calculate what the total number of events that occured was, detected or o...
In the traditional Birthday Paradox the question is "what are the chances that two or more people in a group of $n$ people share a birthday". I'm stuck on a problem which is an extension of this. Instead of knowing the probability that two people share a birthday, I need to extend the question to know what is the prob...
I've sampled a real world process, network ping times. The "round-trip-time" is measured in milliseconds. Results are plotted in a histogram: Latency has a minimum value, but a long upper tail. I want to know what statistical distribution this is, and how to estimate its parameters. Even though the distribution is no...
What would be the best way to display changes in two scalar variables (x,y) over time (z), in one visualization? One idea that I had was to plot x and y both on the vertical axis, with z as the horizontal. Note: I'll be using R and likely ggplot2
The title is quite self-explanatory - I'd like to know if there's any other parametric technique apart from repeated-measures ANOVA, that can be utilized in order to compare several (more than 2) repeated measures?
Well, we've got favourite statistics quotes. What about statistics jokes?
I am working with a large data set (approximately 50K observations) and trying to running a Maximum likelihood estimation on 5 unknowns in Stata. I encountered an error message of "Numerical Overflow". How can I overcome this? I am trying to run a Stochastic Frontier analysis using the built in Stata command "frontie...
In an average (median?) conversation about statistics you will often find yourself discussing this or that method of analyzing this or that type of data. In my experience, careful study design with special thought with regards to the statistical analysis is often neglected (working in biology/ecology, this seems to be ...
I want to predict the results of a simple card game, to judge on average, how long a game will last. My 'simple' game is; Cards are dealt from a randomised deck to n players (typically 2-4) Each player gets five cards The top card from the deck is turned over Each player takes it in turns to either place a card of the...
I am trying to compare it to Euclidean distance and Pearson correlation
In circular statistics, the expectation value of a random variable $Z$ with values on the circle $S$ is defined as $$ m_1(Z)=\int_S z P^Z(\theta)\textrm{d}\theta $$ (see wikipedia). This is a very natural definition, as is the definition of the variance $$ \mathrm{Var}(Z)=1-|m_1(Z)|. $$ So we didn't need a second momen...
I have a given distance with a standard deviation. I have simulated now a few 100 distances and would like to draw from these distances a sample of 10-20 resembling the original distribution. Is there any standardized way of doing so?
I am looking for a robust version of Hotelling's $T^2$ test for the mean of a vector. As data, I have a $m\ \times\ n$ matrix, $X$, each row an i.i.d. sample of an $n$-dimensional RV, $x$. The null hypothesis I wish to test is $E[x] = \mu$, where $\mu$ is a fixed $n$-dimensional vector. The classical Hotelling test ap...