Id
stringlengths
1
6
PostTypeId
stringclasses
7 values
AcceptedAnswerId
stringlengths
1
6
ParentId
stringlengths
1
6
Score
stringlengths
1
4
ViewCount
stringlengths
1
7
Body
stringlengths
0
38.7k
Title
stringlengths
15
150
ContentLicense
stringclasses
3 values
FavoriteCount
stringclasses
3 values
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
stringlengths
1
6
OwnerUserId
stringlengths
1
6
Tags
list
7905
2
null
7891
2
null
A bit vague answer, but I'll give it a chance. I always felt that the size constraint is the central idea behind this method -- without is seems just to converge to other approaches, effectively to 2-means and ideologically to unsupervised SVM. The previous rather invalidates this idea, the latter way is more intriguin...
null
CC BY-SA 2.5
null
2011-03-05T00:02:10.823
2011-03-05T00:02:10.823
null
null
null
null
7906
2
null
7900
7
null
While generating random data from regular expressions would be a convenient interface, it is not directly supported in R. You could try one level of indirection though: generate random numbers and convert them into strings. For example, to convert a number into a character, you could use the following: ``` > rawToChar(...
null
CC BY-SA 2.5
null
2011-03-05T00:36:49.843
2011-03-05T00:36:49.843
null
null
1537
null
7907
2
null
7902
4
null
From a response to comment, we can adopt an urn model. The urn contains 100,000 balls representing all cases. An unknown number of these are black ("invalid"); they are of no interest. We are interested solely in the non-black balls in the urn. Of those, some are of color "A" and others of color "B". The main rese...
null
CC BY-SA 2.5
null
2011-03-05T01:53:21.813
2011-03-05T01:53:21.813
null
null
919
null
7908
2
null
7903
4
null
## Ad hoc approach I'd assume that $\beta_i$ is reasonably reliable because it was estimated on many students, most of who did not cheat on question $i$. For each student $j$, sort the questions in order of increasing difficulty, compute $\beta_i + q_j$ (note that $q_j$ is just a constant offset) and threshold it at...
null
CC BY-SA 2.5
null
2011-03-05T03:21:10.143
2011-03-05T07:35:00.167
2011-03-05T07:35:00.167
3369
3369
null
7909
2
null
7868
1
null
This can be done using relational database. R has a nice implementation of this (see this post on [sqldf](https://stackoverflow.com/questions/1169551/sql-like-functionality-in-r)). MS Access (or even Excel) will work just as well. The idea here is you want to create a table that maps a number (as you say, of 5/6 digits...
null
CC BY-SA 2.5
null
2011-03-05T05:12:14.717
2011-03-05T05:12:14.717
2017-05-23T12:39:26.593
-1
3551
null
7911
2
null
7899
30
null
Does the picture below look like what you want to achieve? ![enter image description here](https://i.stack.imgur.com/NDRc2.png) Here's the updated R code, following your comments: ``` do.it <- function(df, type="confidence", ...) { require(ellipse) lm0 <- lm(y ~ x, data=df) xc <- with(df, xyTable(x, y)) df.new ...
null
CC BY-SA 2.5
null
2011-03-05T09:57:01.973
2011-03-06T15:50:56.043
2011-03-06T15:50:56.043
930
930
null
7912
1
7921
null
10
9382
The question is pretty much contained in the title. What is the Mahalanobis distance for two distributions of different covariance matrices? What I have found till now assumes the same covariance for both distributions, i.e., something of this sort: $$\Delta^T \Sigma^{-1} \Delta$$ What if I have two different $\Sigma$s...
Mahalanobis distance between two bivariate distributions with different covariances
CC BY-SA 2.5
null
2011-03-05T10:48:05.390
2014-03-12T20:30:59.290
2011-03-07T14:24:08.353
223
3586
[ "normal-distribution", "multivariate-analysis", "distance-functions" ]
7913
2
null
7903
3
null
If you want to get into some more complex approaches, you might look at item response theory models. You could then model the difficulty of each question. Students who got difficult items correct while missing easier ones would, I think, be more likely to be cheating than those who did the reverse. It's been more tha...
null
CC BY-SA 2.5
null
2011-03-05T11:33:10.813
2011-03-05T11:33:10.813
null
null
686
null
7914
2
null
7826
2
null
So you have a population each of whom can have zero or more conditions. To answer the question: How many hospital patients have A? It seems to me that the best you can do is take your favourite proportion estimator and offer it up with your favourite confidence interval. There are lots of choices, which will make a ...
null
CC BY-SA 2.5
null
2011-03-05T12:46:54.847
2011-03-05T13:02:13.523
2011-03-05T13:02:13.523
1739
1739
null
7915
1
7922
null
6
2427
I'm doing a binary classification using SVM classfier, libsvm, where roughly 95% belongs to one class. The parameters C and gamma are to be set before the actual training takes place. I followed [the tutorial](http://www.csie.ntu.edu.tw/~cjlin/libsvm/) but still can't get any good results. There is a script that comes...
Efficient way to classify with SVM
CC BY-SA 2.5
null
2011-03-05T13:09:10.763
2011-03-05T21:56:07.913
2011-03-05T15:49:16.910
1371
1371
[ "machine-learning", "svm" ]
7916
2
null
7915
1
null
By Default libSVM find the optimal hyper-parameters, for the SVM model using cross validation methods and by using Accuracy (for classification), or Mean Square Error (for regression) as a measure for evaluation. Weka has several other evaluation metric to find the optimal parameters (using the gridSearch) If the metri...
null
CC BY-SA 2.5
null
2011-03-05T14:19:04.687
2011-03-05T14:19:04.687
null
null
21360
null
7917
2
null
7774
16
null
I'm providing this as a second answer since the analysis is completely elementary and provides exactly the desired result. Proposition For $c > 0$ and $n \geq 1$, $$ \mathbb{P}(T < n \log n - c n ) < e^{-c} \>. $$ The idea behind the proof is simple: - Represent the time until all coupons are collected as $T = \sum_...
null
CC BY-SA 2.5
null
2011-03-05T14:28:38.093
2011-03-05T14:34:54.470
2011-03-05T14:34:54.470
2970
2970
null
7919
1
7924
null
8
10431
I am working on a linear regression with R and there are many 0 values in my predictor variables. How are these handled in R's `lm()` function? Should I remove this data for more accurate analysis? Any advice is appreciated. Thanks.
How are zero values handled in lm()?
CC BY-SA 2.5
null
2011-03-05T18:30:43.537
2014-01-20T15:50:06.813
2011-03-05T19:07:45.807
930
1422
[ "r", "regression" ]
7920
2
null
7919
2
null
What % of the predictor is 0, and what other values does it take on? The concern is whether a predictor with such little variation (vast majority being the value of 0) would be useful in a regression model. To approach this, you can first stratify and do one analysis with the subset of the data where predictor is 0, a...
null
CC BY-SA 2.5
null
2011-03-05T18:49:20.003
2011-03-05T18:49:20.003
null
null
812
null
7921
2
null
7912
6
null
There are many notions of distance between probability distributions. Which one to use depends on your goals. [Total variation distance](http://en.wikipedia.org/wiki/Total_variation_distance) is a natural way of measuring overlap between distributions. If you are working with multivariate Normals, the [Kullback-Leibl...
null
CC BY-SA 2.5
null
2011-03-05T20:38:55.867
2011-03-05T20:38:55.867
null
null
1670
null
7922
2
null
7915
5
null
I would do two things. First, to address your issue with accuracy due to imbalanced data, you need to set the cost of misclassifying positive and negative examples separately. A reasonable rule of thumb in your case would be to set the cost to 5 for the larger class and to 95 for the smaller class. This way misclassify...
null
CC BY-SA 2.5
null
2011-03-05T21:56:07.913
2011-03-05T21:56:07.913
null
null
3369
null
7923
1
null
null
2
2817
In SPSS, I want to compare two clusters of management sciences department faculty members in two universities. - Which test should I use? - Can you explain how to do it in SPSS?
How can I compare Likert scale data of two clusters in SPSS?
CC BY-SA 2.5
null
2011-03-06T08:21:51.870
2011-03-30T18:33:50.403
2011-03-30T18:33:50.403
930
3570
[ "clustering", "spss", "scales", "likert" ]
7924
2
null
7919
5
null
The problem you described here is known as limited dependent variable problem usually represented by truncated or censored data (the former could be seen as a special case of the later). In this case application of `lm()` function would not be the best choice, since it in general will produce biased and inconsistent es...
null
CC BY-SA 2.5
null
2011-03-06T09:56:37.253
2011-03-06T09:56:37.253
2017-04-13T12:44:33.977
-1
2645
null
7925
1
7927
null
17
3614
I am currently working on a project where I generate random values using [low discrepancy / quasi-random point sets](http://www.puc-rio.br/marco.ind/quasi_mc.html), such as Halton and Sobol point sets. These are essentially $d$-dimensional vectors that mimic a $d$-dimensional uniform(0,1) variables, but have a better s...
Scrambling and correlation in low discrepancy sequences (Halton/Sobol)
CC BY-SA 2.5
null
2011-03-06T10:43:38.317
2011-03-07T02:48:43.523
2011-03-07T02:48:43.523
3572
3572
[ "hypothesis-testing", "monte-carlo", "random-generation", "randomness" ]
7926
2
null
7873
3
null
It does sound like you are in a bit of a quandary because you only have 1 response variable for each individual measurement. I was initially going to recommend a multi-level approach. But in order for that to work you need to observe the response at the lowest level - which you do not - you observe your response at t...
null
CC BY-SA 2.5
null
2011-03-06T11:31:31.633
2011-03-06T11:31:31.633
null
null
2392
null
7927
2
null
7925
13
null
Scrambling is usually an operation applied to a $(t,m,s)$ digital net which uses some base $b$. Sobol' nets use $b = 2$, for example, while Faure nets use a prime number for $b$. The purpose of scrambling is to (hopefully) get an even more uniform distribution, especially if you can only use a small number of points. A...
null
CC BY-SA 2.5
null
2011-03-06T16:07:27.103
2011-03-06T20:52:24.660
2011-03-06T20:52:24.660
2970
2970
null
7928
2
null
7868
3
null
Ah! "Cell" apparently means "cell phone" (rather than a generic cell such as a square on a map grid). Thus, for each prefix, you would like to identify a geographic region in which that prefix is found. These regions are not predefined; rather, you would like to estimate their extents from the data you have. (This ...
null
CC BY-SA 2.5
null
2011-03-06T16:39:48.037
2011-03-06T16:39:48.037
2017-04-13T12:33:47.693
-1
919
null
7929
1
7930
null
16
30919
I played around with some unit root testing in R and I am not entirely sure what to make of the k lag parameter. I used the augmented Dickey Fuller test and the Philipps Perron test from the [tseries](http://cran.r-project.org/web/packages/tseries/index.html) package. Obviously the default $k$ parameter (for the `adf.t...
Understanding the k lag in R's augmented Dickey Fuller test
CC BY-SA 2.5
null
2011-03-06T17:18:02.327
2011-08-24T10:29:44.190
2011-03-06T18:47:18.750
930
704
[ "r", "time-series", "trend" ]
7930
2
null
7929
6
null
It's been a while since I looked at ADF tests, however I do remember at least two versions of the adf test. [http://www.stat.ucl.ac.be/ISdidactique/Rhelp/library/tseries/html/adf.test.html](http://www.stat.ucl.ac.be/ISdidactique/Rhelp/library/tseries/html/adf.test.html) [http://cran.r-project.org/web/packages/fUnitRoot...
null
CC BY-SA 2.5
null
2011-03-06T19:07:39.157
2011-03-06T19:40:52.517
2011-03-06T19:40:52.517
2775
2775
null
7931
2
null
7815
6
null
I would also add that the large scale data also introduces the problem of potential "Bad data". Not only missing data, but data errors and inconsistent definitions introduced by every piece of a system which ever touched the data. So, in additional to statistical skills, you need to become an expert data cleaner, unle...
null
CC BY-SA 2.5
null
2011-03-06T20:31:50.597
2011-03-06T20:31:50.597
null
null
3489
null
7932
2
null
7815
12
null
Good programming skills are a must. You need to be able to write efficient code that can deal with huge amounts of data without choking, and maybe be able to parallelize said code to get it to run in a reasonable amount of time.
null
CC BY-SA 2.5
null
2011-03-06T21:38:24.733
2011-03-06T21:38:24.733
null
null
1347
null
7933
2
null
7815
127
null
Good answers have already appeared. I will therefore just share some thoughts based on personal experience: adapt the relevant ones to your own situation as needed. For background and context--so you can account for any personal biases that might creep in to this message--much of my work has been in helping people mak...
null
CC BY-SA 2.5
null
2011-03-06T22:16:42.373
2011-03-07T00:07:36.283
2011-03-07T00:07:36.283
919
919
null
7935
1
7938
null
87
75939
From what I know, using lasso for variable selection handles the problem of correlated inputs. Also, since it is equivalent to Least Angle Regression, it is not slow computationally. However, many people (for example people I know doing bio-statistics) still seem to favour stepwise or stagewise variable selection. Are ...
What are disadvantages of using the lasso for variable selection for regression?
CC BY-SA 2.5
null
2011-03-06T23:21:24.703
2021-02-08T18:35:51.057
2012-12-14T18:21:00.483
4856
2973
[ "regression", "feature-selection", "lasso" ]
7936
2
null
7935
6
null
One practical disadvantage of lasso and other regularization techniques is finding the optimal regularization coefficient, lambda. Using cross validation to find this value can be just as expensive as stepwise selection techniques.
null
CC BY-SA 2.5
null
2011-03-07T00:23:32.770
2011-03-07T00:23:32.770
null
null
2965
null
7937
2
null
7935
0
null
One big one is the difficulty of doing hypothesis testing. You can't easily figure out which variables are statistically significant with Lasso. With stepwise regression, you can do hypothesis testing to some degree, if you're careful about your treatment of multiple testing.
null
CC BY-SA 2.5
null
2011-03-07T00:38:38.003
2011-03-07T00:38:38.003
null
null
1347
null
7938
2
null
7935
39
null
There is NO reason to do stepwise selection. It's just wrong. LASSO/LAR are the best automatic methods. But they are automatic methods. They let the analyst not think. In many analyses, some variables should be in the model REGARDLESS of any measure of significance. Sometimes they are necessary control variables. ...
null
CC BY-SA 2.5
null
2011-03-07T00:58:47.170
2011-03-07T00:58:47.170
null
null
686
null
7939
1
8310
null
6
2059
I'm working on a problem from "The Elements of Statistical Learning" (prob. 6.8): > Suppose that for continuous response $Y$ and predictor $X$, we model the joint density of $X, Y$ using a multivariate Gaussian kernel estimator. Note that the kernel in this case would be the product kernel $\phi_{\lambda}(...
Gaussian kernel estimator as Nadaraya-Watson estimator?
CC BY-SA 2.5
null
2011-03-07T01:06:05.880
2015-04-23T05:57:31.650
2015-04-23T05:57:31.650
9964
988
[ "self-study", "classification", "kernel-smoothing" ]
7940
2
null
6225
3
null
Yes, it is possible to prove the null--in exactly the same sense that it is possible to prove any alternative to the null. In a Bayesian analysis, it is perfectly possible for the odds in favor of the null versus any of the proposed alternatives to it to become arbitrarily large. Moreover, it is false to assert, as som...
null
CC BY-SA 2.5
null
2011-03-07T01:52:33.090
2011-03-07T01:52:33.090
null
null
null
null
7941
1
7942
null
18
35826
I am not in statistics field. I have seen the word "tied data" while reading about Rank Correlation Coefficients. - What is tied data? - What is an example of tied data?
What is tied data in the context of a rank correlation coefficient?
CC BY-SA 2.5
null
2011-03-07T02:49:18.230
2019-07-17T22:46:26.403
2019-07-17T22:46:26.403
3277
3584
[ "correlation", "nonparametric", "ranks" ]
7942
2
null
7941
7
null
It means data that have the same value; for instance if you have 1,2,3,3,4 as the dataset then the two 3's are tied data. If you have 1,2,3,4,5,5,5,6,7,7 as the dataset then the 5's and the 7's are tied data.
null
CC BY-SA 2.5
null
2011-03-07T02:57:35.370
2011-03-07T02:57:35.370
null
null
3585
null
7943
2
null
7941
5
null
It's simply two identical data values, such as observing 7 twice in the same data set. This comes up in the context of statistical methods that assume data has a continuous and so identical measurements are impossible (or technically, the probability identical values is zero). Practical complications arise when these m...
null
CC BY-SA 2.5
null
2011-03-07T02:58:09.177
2011-03-07T02:58:09.177
null
null
319
null
7944
2
null
7941
16
null
"Tied data" comes up in the context of rank-based non-parametric statistical tests. Non-parametric tests: testing that does not assume a particular probability distribution, eg it does not assume a bell-shaped curve. rank-based: a large class of non-parametric tests start by converting the numbers (eg "3 days", "5 day...
null
CC BY-SA 2.5
null
2011-03-07T03:02:06.560
2011-03-07T03:49:19.673
2011-03-07T03:49:19.673
919
812
null
7945
2
null
7727
13
null
The question concerns calculating the correlation between two irregularly sampled time series (one-dimensional stochastic processes) and using that to find the time offset where they are maximally correlated (their "phase difference"). This problem is not usually addressed in time series analysis, because time series d...
null
CC BY-SA 2.5
null
2011-03-07T04:29:43.617
2011-03-07T04:29:43.617
null
null
919
null
7946
1
8208
null
4
3774
I'm not in Statistics field. I conducted the case study and collected the data as shown below I have data as shown in the table below: ![enter image description here](https://i.stack.imgur.com/mH1tC.jpg) ![enter image description here](https://i.stack.imgur.com/ExRl1.jpg) I would like to find correlation coefficient fr...
What correlation coefficient and graph is appropriate with this data?
CC BY-SA 2.5
null
2011-03-07T05:39:06.227
2011-11-07T14:35:15.457
2011-03-19T04:38:14.770
3584
3584
[ "data-visualization", "spearman-rho", "ranks" ]
7947
2
null
7923
1
null
As chl says, the general issue of what statistical test to use when the dependent variable is a scale based on likert items has been discussed [elsewhere on this site](https://stats.stackexchange.com/questions/203/group-differences-on-a-five-point-likert-item). For the pragmatic task of running such analyses in SPSS, t...
null
CC BY-SA 2.5
null
2011-03-07T06:58:33.697
2011-03-07T06:58:33.697
2017-04-13T12:44:20.840
-1
183
null
7948
1
7950
null
177
211155
I am running linear regression models and wondering what the conditions are for removing the intercept term. In comparing results from two different regressions where one has the intercept and the other does not, I notice that the $R^2$ of the function without the intercept is much higher. Are there certain conditions...
When is it ok to remove the intercept in a linear regression model?
CC BY-SA 3.0
null
2011-03-07T09:14:00.487
2022-09-22T01:13:33.580
2022-09-22T01:13:33.580
11887
1422
[ "regression", "linear-model", "r-squared", "intercept", "faq" ]
7949
2
null
7912
3
null
Intro As @vqv mentionned Total variation and Kullback Leibler are two interesting distance. The first one is meaningfull because it can be directly related to first and second type errors in hypothesis testing. The problem with the Total variation distance is that it can be difficult to compute. The Kullback Leibler di...
null
CC BY-SA 2.5
null
2011-03-07T09:19:14.240
2011-03-11T12:33:23.773
2017-04-13T12:58:32.177
-1
223
null
7950
2
null
7948
120
null
The shortest answer: never, unless you are sure that your linear approximation of the data generating process (linear regression model) either by some theoretical or any other reasons is forced to go through the origin. If not the other regression parameters will be biased even if intercept is statistically insignifica...
null
CC BY-SA 2.5
null
2011-03-07T10:16:46.850
2011-03-07T10:16:46.850
null
null
2645
null
7951
1
null
null
2
476
I would like to find the correlation between two variables. It was suggested to me that two variables should be independent; otherwise it is not meaningful statistically to calculate a correlation. For example, variable is x and another is $y$ which won't be calculated from $x$, e.g., $y=ab/c+x$. $a$, $b$, and $c$ are ...
Do two variables need to be independent in order to obtain a correlation?
CC BY-SA 3.0
null
2011-03-07T10:22:05.520
2015-03-21T16:32:58.547
2011-09-29T12:05:13.090
183
3584
[ "correlation", "dataset", "independence", "non-independent" ]
7952
1
7953
null
17
9338
I am using Sweave and xtable to generate a report. I would like to add some coloring on a table. But I have not managed to find any way to generate colored tables with xtable. Is there any other option?
How to create coloured tables with Sweave and xtable?
CC BY-SA 2.5
null
2011-03-07T11:15:38.937
2017-05-18T21:16:54.990
2017-05-18T21:16:54.990
28666
1709
[ "r", "reproducible-research" ]
7953
2
null
7952
20
null
Although I didn't try this explicitly from with R (I usually post-process the Tables in Latex directly with `\rowcolor`, `\rowcolors`, or the [colortbl](http://ctan.org/pkg/colortbl) package), I think it would be easy to do this by playing with the `add.to.row` arguments in `print.xtable()`. It basically expect two com...
null
CC BY-SA 2.5
null
2011-03-07T11:59:48.103
2011-03-08T10:30:23.020
2011-03-08T10:30:23.020
930
930
null
7954
2
null
7607
3
null
I think this is a good question and I don't kown much about implementations. Since wavelet is 'mutli-resolution' you have two types of solutions (which are somehow connected): - Modify your signal for example extend you signal over the actual boundary to have meaningfull coefficients. Exemples of that are : periodi...
null
CC BY-SA 2.5
null
2011-03-07T13:17:28.140
2011-03-07T13:17:28.140
null
null
223
null
7955
1
null
null
2
277
Would you please give an intuitive illustration of Newton's Method, when we deal with nonlinear regression? Basically I understand that if we can use Taylor's theorem to expand the RSS function of parameter beta, we can change it into quadratic form, and minimize RSS w.r.t parameter. Please give me a multivariate exam...
The usage of Newton's method in nonlinear regression
CC BY-SA 2.5
null
2011-03-07T14:10:05.547
2018-08-15T08:08:17.300
2018-08-15T08:08:17.300
11887
3525
[ "optimization", "econometrics", "nonlinear-regression" ]
7956
1
7957
null
7
16740
Starting out with arima models in R, I do not understand why fitted.values (of an AR(2) process for example) are not part of the output like they are in regressions. Did I miss them when running `str(result)` or did I get something completely wrong?
Why are fitted.values not part the R object returned from arima?
CC BY-SA 2.5
null
2011-03-07T14:24:12.427
2011-03-08T01:26:36.423
null
null
704
[ "r", "time-series", "arima" ]
7957
2
null
7956
13
null
Use `fitted()` function from the `forecast` package. Since arima object saves residuals it is easy to compute fitted values from it.
null
CC BY-SA 2.5
null
2011-03-07T15:10:22.120
2011-03-08T01:26:36.423
2011-03-08T01:26:36.423
159
2645
null
7959
1
null
null
34
9045
I want to estimate the quantile of some data. The data are so huge that they can not be accommodated in the memory. And data are not static, new data keep coming. Does anyone know any algorithm to monitor the quantiles of the data observed so far with very limited memory and computation? I find [P2 algorithm](http://ci...
Algorithm to dynamically monitor quantiles
CC BY-SA 2.5
null
2011-03-07T15:53:27.493
2015-07-14T18:44:14.450
2015-07-14T18:44:14.450
919
3594
[ "algorithms", "quantiles" ]
7960
1
7967
null
25
598
The New York Times has a long comment on the 'value-added' teacher evaluation system being used to give feedback to New York City educators. The lede is the equation used to calculate the scores - presented without context. The rhetorical strategy appears to be intimidation via math: ![alt text](https://graphics8.nyt...
Equations in the news: Translating a multi-level model to a general audience
CC BY-SA 2.5
null
2011-03-07T16:07:26.140
2016-09-15T00:27:59.043
2020-06-11T14:32:37.003
-1
3320
[ "regression", "multilevel-analysis", "statistics-in-media" ]
7961
2
null
6896
4
null
What are you trying to do with the nearest neighbor information? I would answer that question, and then compare the different distance measures in light of that. For example, say you are trying to classify poses based on the joint configuration, and would like joint vectors from the same pose to be close together. A s...
null
CC BY-SA 2.5
null
2011-03-07T17:08:51.720
2011-03-07T17:08:51.720
null
null
3595
null
7962
2
null
7959
2
null
This can be adapted from algorithms that determine the median of a dataset online. For more information, see this stackoverflow post - [https://stackoverflow.com/questions/1387497/find-median-value-from-a-growing-set](https://stackoverflow.com/questions/1387497/find-median-value-from-a-growing-set)
null
CC BY-SA 2.5
null
2011-03-07T17:16:58.733
2011-03-07T17:16:58.733
2017-05-23T12:39:26.593
-1
3595
null
7963
2
null
7959
19
null
The P2 algorithm is a nice find. It works by making several estimates of the quantile, updating them periodically, and using quadratic (not linear, not cubic) interpolation to estimate the quantile. The authors claim quadratic interpolation works better in the tails than linear interpolation and cubic would get too f...
null
CC BY-SA 2.5
null
2011-03-07T17:29:15.047
2011-03-07T17:29:15.047
null
null
919
null
7964
2
null
7774
10
null
Although @cardinal has already given an answer that gives precisely the bound I was looking for, I have found a similar Chernoff-style argument that can give a stronger bound: Proposition: $$ Pr (T \leq n \log n - c n) \leq \exp(- \frac{3c^2}{\pi^2} ) \> . $$ (this is stronger for $c > \frac{\pi^2}{3}$ ) Proof: As i...
null
CC BY-SA 2.5
null
2011-03-07T17:56:05.703
2011-03-08T01:58:42.140
2011-03-08T01:58:42.140
2970
3500
null
7965
2
null
7960
2
null
There is just nothing to understand here. Well, ok, it is just a standard linear regression model. It assumes that the score of a student can be described as a linear function of several factors, including school and teacher efficiency coefficients -- thus it shares all the standard problems of linear models, mainly th...
null
CC BY-SA 2.5
null
2011-03-07T18:09:46.317
2011-03-07T19:35:16.397
2011-03-07T19:35:16.397
null
null
null
7966
2
null
7959
8
null
I think [whuber's suggestion](https://stats.stackexchange.com/questions/7959/algorithm-to-dynamically-monitor-quantiles/7963#7963) is great and I would try that first. However, if you find you really can't accomodate the $O(\sqrt N)$ storage or it doesn't work out for some other reason, here is an idea for a different ...
null
CC BY-SA 2.5
null
2011-03-07T18:20:10.767
2011-03-07T18:20:10.767
2017-04-13T12:44:26.710
-1
2898
null
7967
2
null
7960
12
null
Here's one possibility. Assessing teacher performance has traditionally been difficult. One part of this difficulty is that different students have different levels of interest in a given subject. If a given student gets an A, this doesn't necessarily mean that teaching was excellent -- rather, it may mean that a very ...
null
CC BY-SA 2.5
null
2011-03-07T19:26:04.770
2011-03-07T23:43:58.997
2011-03-07T23:43:58.997
3369
3369
null
7968
2
null
7960
12
null
"Your teaching score depends on how well your students did compared to a prediction made based on - What they knew beforehand, as measured by a pretest, - How well we think the students can learn based on what we know about them individually (their "characteristics"), - And how well students do on average in your d...
null
CC BY-SA 2.5
null
2011-03-07T19:31:19.560
2011-03-07T19:48:59.913
2011-03-07T19:48:59.913
919
919
null
7969
1
7971
null
14
1759
I have a simple sampling problem, where my inner loop looks like: ``` v = sample_gamma(k, a) ``` where `sample_gamma` samples from the Gamma distribution to form a Dirichlet sample. It works well, but for some values of k/a, some of the downstream computation underflows. I adapted it to use log space variables: ``` v ...
How to quickly sample X if exp(X) ~ Gamma?
CC BY-SA 2.5
null
2011-03-07T19:44:05.827
2011-03-16T21:15:33.023
2011-03-08T08:19:12.243
2116
2067
[ "sampling", "gamma-distribution" ]
7970
2
null
5115
2
null
Bill James for his work in statistics that evaluate MLB player performance. His work spawned the term Sabermetics. He has created numerous statistics that can be found throughout the baseball world. His ideas stem from how to capture a player's overall impact on a game through run production (offense) and runs saved ...
null
CC BY-SA 2.5
null
2011-03-07T20:52:49.007
2011-03-07T20:52:49.007
null
null
null
null
7971
2
null
7969
9
null
Consider a small shape parameter $\alpha$ near 0, such as $\alpha = 1/100$. In the range between 0 and $\alpha$, $e^{-\alpha}$ is approximately $1$, so the Gamma pdf is approximately $x^{\alpha-1}dx / \Gamma(\alpha)$. This can be integrated to an approximate CDF, $F_\alpha(x) = \frac{x^\alpha}{\alpha \Gamma(\alpha)}$...
null
CC BY-SA 2.5
null
2011-03-07T21:14:37.513
2011-03-16T21:15:33.023
2020-06-11T14:32:37.003
-1
919
null
7972
1
7978
null
6
298
I have a number of rasters of environmental data (~10) which may be important predictors for modelling species presence and abundance at ~10 different locations. I would like to know which of the rasters are important in explaining the variance in observed results. Is it appropriate to look for principal components of ...
Principal components of spatial variables
CC BY-SA 3.0
null
2011-03-07T21:32:50.493
2011-04-12T08:55:39.260
2011-04-12T08:55:39.260
2993
2993
[ "pca", "spatial" ]
7973
1
null
null
4
259
Imagine you have a set of four elements (A-D) with some numeric values of a measured property (several observations for each element): ``` A: 26 25 29 21 B: 24 17 16 C: 32 34 29 19 25 27 28 D: 23 29 26 20 14 ``` I have to detect if there are significant differences on the average levels. So I run a one way ANOVA to de...
Incremental one-way ANOVA
CC BY-SA 2.5
null
2011-03-07T21:52:23.480
2011-03-09T18:50:07.717
2011-03-08T16:45:09.477
3576
3576
[ "anova" ]
7974
2
null
5115
9
null
[Samuel S. Wilks](http://en.wikipedia.org/wiki/Samuel_S._Wilks) was a leader in the development of mathematical statistics. He developed the [theorem on the distribution of the likelihood ratio](http://en.wikipedia.org/wiki/Likelihood-ratio_test#Distribution%3a_Wilks.27_theorem), a fundamental result that is used in a ...
null
CC BY-SA 2.5
null
2011-03-07T22:00:16.830
2011-03-07T22:00:16.830
null
null
3601
null
7975
1
8037
null
14
6642
Having worked mostly with cross sectional data so far and very very recently browsing, scanning stumbling through a bunch of introductory time series literature I wonder what which role explanatory variables are playing in time series analysis. I would like to explain a trend instead of de-trending. Most of what I rea...
What to make of explanatories in time series?
CC BY-SA 2.5
null
2011-03-07T22:42:12.067
2019-11-25T10:35:58.813
2011-03-08T09:12:10.913
2116
704
[ "r", "time-series", "multivariate-analysis" ]
7976
1
7981
null
3
301
Can we do that? If yes, then what are the conditions which should be met?
Can we compute bivariate from marginal distributions?
CC BY-SA 4.0
0
2011-03-07T22:50:42.937
2019-01-30T01:07:32.923
2019-01-30T01:07:32.923
44269
null
[ "distributions", "multivariate-analysis", "marginal-distribution" ]
7977
1
7984
null
92
72907
I am wondering how to generate uniformly distributed points on the surface of the 3-d unit sphere? Also after generating those points, what is the best way to visualize and check whether they are truly uniform on the surface $x^2+y^2+z^2=1$?
How to generate uniformly distributed points on the surface of the 3-d unit sphere?
CC BY-SA 2.5
null
2011-03-07T22:57:20.690
2018-04-02T15:32:48.477
2011-03-07T23:42:01.520
930
3552
[ "random-generation" ]
7978
2
null
7972
4
null
Your idea about the "rasters" is not very clearly stated, but you might have a look at the paper by Borcard and Legendre (1994) and [their later works](http://www.bio.umontreal.ca/legendre/reprints/index.html) on spatial eigenvector-based analyses to see if one of the approaches will fit to your problem. [Borcard, D., ...
null
CC BY-SA 2.5
null
2011-03-07T23:13:09.110
2011-03-07T23:28:39.240
2011-03-07T23:28:39.240
3467
3467
null
7979
1
null
null
13
1122
Suppose $X \sim \mathcal{N}(\mu_x, \sigma^2_x)$ and $Y \sim \mathcal{N}(\mu_y, \sigma^2_y)$ I am interested in $z = \min(\mu_x, \mu_y)$. Is there an unbiased estimator for $z$? The simple estimator of $\min(\bar{x}, \bar{y})$ where $\bar{x}$ and $\bar{y}$ are sample means of $X$ and $Y$, for example, is biased (though...
Unbiased estimator for the smaller of two random variables
CC BY-SA 4.0
null
2011-03-07T23:15:04.000
2023-04-01T07:16:01.120
2023-04-01T07:16:01.120
362671
3602
[ "random-variable", "unbiased-estimator", "extreme-value", "point-estimation" ]
7980
2
null
7977
0
null
My best guess would be to first generate a set of uniformly distributed points in 2 dimensional space and to then project those points onto the surface of a sphere using some sort of projection. You will probably have to mix and match the way you generate the points with the way that you map them. In terms of the 2D p...
null
CC BY-SA 2.5
null
2011-03-07T23:32:00.477
2011-03-07T23:32:00.477
null
null
3572
null
7981
2
null
7976
6
null
Just knowing the marginal distributions of two variables isn't sufficient to specify their bivariate distribution. You need more information about their joint relationship. Simple example: two random normals can have any particular correlation with each other, but still have the same marginal distributions. It sounds l...
null
CC BY-SA 2.5
null
2011-03-07T23:44:19.147
2011-03-07T23:44:19.147
null
null
1569
null
7982
1
8139
null
7
1388
I'm working on a binary classification problem, with about 1000 binary features in total. The problem is that for each datapoint, I only know the values of a small subset of the features (around 10-50), and the features in this subset are pretty much random. What's a good way to deal with the problem of the missing fea...
Binary classification when many binary features are missing
CC BY-SA 2.5
null
2011-03-08T00:05:58.443
2018-12-29T00:11:05.583
2018-12-29T00:11:05.583
11887
1106
[ "classification", "missing-data", "semi-supervised-learning" ]
7983
2
null
7977
8
null
I had a similar problem (n-sphere) during my PhD and one of the local 'experts' suggested rejection sampling from a n-cube! This, of course, would have taken the age of the universe as I was looking at n in the order of hunderds. The algorithm I ended up using is very simple and published in: W.P. Petersen and A. Berna...
null
CC BY-SA 2.5
null
2011-03-08T00:22:36.827
2011-03-08T00:22:36.827
null
null
530
null
7984
2
null
7977
95
null
A standard method is to generate three standard normals and construct a unit vector from them. That is, when $X_i \sim N(0,1)$ and $\lambda^2 = X_1^2 + X_2^2 + X_3^2$, then $(X_1/\lambda, X_2/\lambda, X_3/\lambda)$ is uniformly distributed on the sphere. This method works well for $d$-dimensional spheres, too. In 3D ...
null
CC BY-SA 3.0
null
2011-03-08T00:30:43.540
2011-11-10T15:32:58.263
2011-11-10T15:32:58.263
919
919
null
7985
2
null
7884
17
null
Following up to Steve's reply, there is a much faster way in data.table : ``` > # Preamble > dx <- data.frame( + ID = sort(sample(1:7000, 400000, TRUE)) + , AGE = sample(18:65, 400000, TRUE) + , FEM = sample(0:1, 400000, TRUE) + ) > dxt <- data.table(dx, key='ID') > # fast self join > system.time(ans2<-dxt...
null
CC BY-SA 2.5
null
2011-03-08T00:53:05.203
2011-03-08T00:53:05.203
null
null
3589
null
7986
1
null
null
2
115
This problem is basically the classic asset selling problem but with imperfect state information. In the classical problem, we have an asset that we wish to sell, we receive offers w(0) to w(N-1). If we accept the offer at a given period, we can invest that money with a certain rate of interest r > 0. We suppose that...
Optimal stopping under partially observable state
CC BY-SA 2.5
null
2011-03-08T01:01:16.077
2011-03-08T01:01:16.077
null
null
null
[ "optimal-stopping" ]
7987
2
null
7979
9
null
This is just a couple of comments not an answer (don't have enough rep. point). (1). There is an explicit formula for the bias of the simple estimator $\min(\bar{x},\bar{y})$ here: Clark, C. E. 1961, Mar-Apr. The greatest of a finite set of random variables. Operations Research 9 (2): 145–162. Not sure how this helps th...
null
CC BY-SA 4.0
null
2011-03-08T01:06:59.107
2023-04-01T07:14:38.713
2023-04-01T07:14:38.713
362671
3036
null
7988
2
null
7977
20
null
Here is some rather simple R code ``` n <- 100000 # large enough for meaningful tests z <- 2*runif(n) - 1 # uniform on [-1, 1] theta <- 2*pi*runif(n) - pi # uniform on [-pi, pi] x <- sin(theta)*sqrt(1-z^2) # based on angle y <- cos(theta)*sqrt(1-z^2) ``` It is very...
null
CC BY-SA 2.5
null
2011-03-08T01:19:47.993
2011-03-08T01:19:47.993
null
null
2958
null
7989
1
null
null
3
250
I have a general question. What kind of noise is additive, and what about multiplicative noise? How to determine the nature of noise? Thanks a lot for your help.
Determining the nature of noise
CC BY-SA 2.5
null
2011-03-08T01:48:03.257
2011-04-29T01:04:54.580
2011-04-29T01:04:54.580
3911
3552
[ "regression" ]
7990
1
8051
null
2
288
Suppose we have the following random process. We start with two vectors $a_1=(0)$ and $b_1=(0)$. In going from $i$ to $i+1$, we will a perturbation to $a_i$ and $b_i$. With probability $p$, we perform Case 1, otherwise perform Case 2. - Case 1: We pick an element of $a_i$, say at coordinate $x$ (chosen uniformly at...
What is the expected dot product of two evolving vectors?
CC BY-SA 2.5
null
2011-03-08T01:51:53.857
2011-03-09T10:28:37.683
2011-03-08T03:55:47.993
386
386
[ "stochastic-processes", "expected-value" ]
7994
1
null
null
3
866
This is problem 12.10 in ["The Elements of Statistical Learning"](http://www-stat.stanford.edu/~tibs/ElemStatLearn/): > Suppose you wish to carry out a linear discriminant analysis (two classes) using a vector of transformations of the input variables $h(x)$. Since $h(x)$ is high-dimensional, you will use a ...
Linear discriminant analysis and the "kernel trick"?
CC BY-SA 2.5
null
2011-03-08T04:08:37.843
2015-04-19T20:47:08.097
2015-04-19T20:47:08.097
9964
988
[ "self-study", "classification", "kernel-trick" ]
7995
2
null
7989
4
null
- Do you know where does the noise comes from? Before doing any statistical test, you think about the origin of the noise you want to remove. Additive noise is independent from the level of the signal, whereas multiplicative noise is proportional to the level of the signal. - If you are not able to know, or if you wa...
null
CC BY-SA 2.5
null
2011-03-08T04:09:54.563
2011-03-08T13:51:49.943
2011-03-08T13:51:49.943
2116
1709
null
7996
1
8042
null
5
198
I am evaluating a scenario's output parameter's dependence on three parameters: A, B and C. For this, I am conducting the following experiments: - Fix A+B, Vary C - Total four sets of (A+B) each having 4 variations of C - Fix B+C, Vary A - Total four sets of (B+C) each having 3 variations of C - Fix C+A, Vary B - To...
What is a good way of estimating the dependence of an output variable on the input parameters?
CC BY-SA 2.5
null
2011-03-08T05:24:45.063
2011-03-09T12:46:51.747
2011-03-09T12:46:51.747
8
2164
[ "r", "regression", "experiment-design" ]
7997
2
null
7155
-2
null
Outliers are important only in the frequentist realm. If a single datapoint adds bias to your model which is defined by an underlying distribution predeterimined by your theory, then it is an outlier for that model. The subjectivity lies in the fact that if your theory posits a different model, then you can have a diff...
null
CC BY-SA 2.5
null
2011-03-08T05:30:48.113
2011-03-08T05:30:48.113
null
null
null
null
7998
2
null
7979
-1
null
I'd be fairly sure an unbiased estimator does not exist. But unbiased estimators don't exist for most quantities, and unbiasedness is not a particularly desirable property in the first place. Why do you want one here?
null
CC BY-SA 2.5
null
2011-03-08T05:36:05.240
2011-03-08T05:36:05.240
null
null
null
null
7999
1
8002
null
5
8101
Let's say I have a function `funToRepeat`: ``` funToRepeat <- function(df){ rows <- nrow(df) cols <- ncol(df) err <- runif( rows * cols ) dfNew <- df + as.data.frame( matrix(err, nrow=rows, ncol=cols) ) dfNew } ``` I want to operate `funToRepeat` on `dfTest` (a toy data set), multiple times, say `n...
How to efficiently repeat a function on a data set in R?
CC BY-SA 2.5
null
2011-03-08T06:32:46.820
2011-03-08T17:04:35.610
null
null
1307
[ "r" ]
8000
1
8014
null
70
47794
Recurrent neural networks differ from "regular" ones by the fact that they have a "memory" layer. Due to this layer, recurrent NN's are supposed to be useful in time series modelling. However, I'm not sure I understand correctly how to use them. Let's say I have the following time series (from left to right): `[0, 1, 2...
Proper way of using recurrent neural network for time series analysis
CC BY-SA 2.5
null
2011-03-08T07:16:01.813
2021-03-15T11:43:31.750
null
null
1496
[ "time-series", "machine-learning", "neural-networks" ]
8001
1
null
null
5
800
I want to discover which genes are expressed in only one of five treatments. This is my pipeline: - ANOVA between the five treatments - Holm multiple testing correction - Tukey for significant genes discovered in step 2 My question is: Should I also correct Tukey p-values for example multiplying the p-value by t...
ANOVA and multiple testing correction in gene screening
CC BY-SA 2.5
null
2011-03-08T07:37:42.527
2011-10-23T14:57:11.427
2011-03-08T07:44:41.863
930
3614
[ "anova", "multiple-comparisons", "genetics" ]
8002
2
null
7999
6
null
I for one would put everything to the list and then use `Reduce`. ``` funToRepeat <- function(dims) { err <- runif(prod(dims)) matrix(err,nrow=dims[1],ncol=dims[2]) } ll <- alply(cbind(rep(10,10),rep(20,10)),1,funToRepeat) sum.ll <- Reduce("+",ll) ``` Then convert to data.frame you need after dividing by l...
null
CC BY-SA 2.5
null
2011-03-08T08:37:39.897
2011-03-08T17:04:35.610
2011-03-08T17:04:35.610
2116
2116
null
8004
2
null
7975
7
null
The same intuition as in cross-section regression can be used in time-series regression. It is perfectly valid to try to explain the trend using other variables. The main difference is that it is implicitly assumed that the regressors are random variables. So in regression model: $$Y_t=\beta_0+X_{t1}\beta_1+...+X_{tk}\...
null
CC BY-SA 2.5
null
2011-03-08T09:35:09.840
2011-03-08T09:35:09.840
null
null
2116
null
8005
1
8054
null
5
129
I have a hypothetical experiment where I am comparing scores on some measure at 1 year to scores on the measure at 4 years. I use a non-paired t-test to see if there is a significant difference between the two. Then, I do: ``` (4 year mean) - (1 year mean) ``` Now, I want to take that value, a function of two differ...
Hypothesis testing on values that are functions of multiple distributions
CC BY-SA 2.5
null
2011-03-08T10:06:32.450
2011-03-09T02:52:53.240
2011-03-09T02:41:24.117
3443
3443
[ "hypothesis-testing" ]
8006
1
null
null
4
1488
How much data is needed to properly fit a GARCH(1,1) model?
Fitting a GARCH(1,1) model
CC BY-SA 2.5
null
2011-03-08T10:48:41.757
2017-08-06T09:43:22.013
2017-08-06T09:43:22.013
53690
3588
[ "time-series", "sample-size", "garch" ]
8007
1
null
null
6
210
Workers in a factory are assembling items built from several parts. For each item they fetch the parts from the warehouse and then assemble the items. I suppose they need a certain time per item for assembly plus a certain time per part for fetching them. $D_{order} = n_{items} * D_{fetch} + n_{parts} * D_{assemble}$ I...
How to estimate time-per-product in a factory?
CC BY-SA 3.0
null
2011-03-08T10:50:34.163
2011-07-13T22:11:16.897
2011-04-14T19:27:35.580
null
3615
[ "data-visualization", "modeling" ]
8008
2
null
5926
3
null
Why not use Cohen's (1988, 1992) guidelines for effect size values? He defines a "small" $(0.1 \leq r \leq 0.23)$, "medium" $(0.24 \leq r \leq 0.36)$ and "large" $(r \geq 0.37)$ effect. This would suggest to use MANOVA with variables whose $r$ is below $0.37$. ### References Cohen, J. (1988) Statistical Power Analys...
null
CC BY-SA 2.5
null
2011-03-08T11:07:54.290
2011-03-16T08:44:56.973
2011-03-16T08:44:56.973
3467
3467
null
8009
1
null
null
7
285
We are measuring conversion rates (% of visitors who bought) on an e-commerce site. The test apply to a segment of visitors who meet specific criteria (for example people from a certain country). The people from the segment are divided into 2 groups. Part of them see a banner and the other don't (control group). Usua...
Minimal number of samples/conversions for statistical validity
CC BY-SA 2.5
null
2011-03-08T11:16:35.207
2017-09-22T13:15:13.903
2011-03-08T11:31:35.020
930
3506
[ "confidence-interval", "chi-squared-test", "cross-validation", "validation" ]
8010
1
8016
null
4
1308
Here is the dual problem for L2 support vector machine: $$\max_{\alpha\in\mathbb{R}^{n}} 2\alpha^{T}y-\alpha^{T}\left(K+n\lambda Id_{\mathbb{R}^{n}}\right)\alpha$$ $$\forall i\in\left\{ 1,\ldots,n\right\} ,\,\alpha_{i}y_{i} \geq0$$ However, using the Lagrangian formulation, I get the following. Is there an argument mis...
Dual problem for L2 support vector machine
CC BY-SA 2.5
0
2011-03-08T12:01:10.703
2011-03-09T18:19:41.447
2011-03-09T10:09:17.420
930
1351
[ "self-study", "svm", "loss-functions", "proof" ]
8011
2
null
8006
5
null
Depends on the coefficients. Simple Monte-Carlo analysis suggests that a lot, about 1000, which is quite surprising. ``` N <- 1000 n <- 1000+N a <- c(0.2, 0.3, 0.4) # GARCH(1,1) coefficients e <- rnorm(n) x <- double(n) s <-double(n) x[1] <- rnorm(1) s[1] <- 0 for(i in 2:n) # Generate GARCH(1,1) process { s[i] ...
null
CC BY-SA 2.5
null
2011-03-08T12:08:20.493
2011-03-08T12:08:20.493
null
null
2116
null
8012
1
null
null
3
132
I start with a presumably non-stationary time series. By some criterium $k$ I extract $n_k$ pairs of times $(t_{k,i,2},t_{k,i,1})$. Now I compute the following quantity: $\bar{\tau} = \frac{1}{K} \sum_k \frac{1}{n_k} \sum_i (t_{k,i,2}-t_{k,i,1})$ What I'm looking for is the error of that quantity. I first began by summ...
Error of a quantity computed from a time series
CC BY-SA 2.5
null
2011-03-08T12:13:11.033
2011-03-10T15:51:47.273
2011-03-10T15:51:47.273
null
3104
[ "time-series", "correlation", "error", "error-propagation" ]