tttjjj/elt_bench huggingface dataset:
Your latter strategy is [winsorising](http://en.wikipedia.org/wiki/Winsorising). Statisticians are usually leery of this, & prefer to use [robust analyses](http://en.wikipedia.org/wiki/Robust_statistics). As far as what the instructor had wanted students to do, I can't say for sure; your best bet would be to see if you can find it in the materials that are online, or send them an email. Regarding how to speed up these algorithms in `R`, that's off-topic for CV (see our [help page](http://stats.stackexchange.com/help)), but should be on-topic on [Stack Overflow](http://stackoverflow.com/).
+1, this is a really nice answer, @Momo. I did find some of the equations harder to read when they were buried in the paragraphs, so I 'blocked' them out by using double dollar-signs (ie \\$$). I hope that's OK (if not, you can rollback, w/ my apologies).
Equivalent question on the math site: [Average Distance Between Random Points in a Rectangle](http://math.stackexchange.com/q/208666/7003). A related question: [Probability that uniformly random points in a rectangle have Euclidean distance less than a given threshold](http://stats.stackexchange.com/q/22488/2970). (Unfortunately, I never got around to taking up @whuber on his suggestions there. I'll try to find some time to do that.)
I think this answer gives a much weaker version of what is normally considered a *distribution-free* statistic and I don't suspect most statisticians would characterize the $t$-test as *distribution-free*, even though it is asympotically so. A typical definition, at least in the classical literature, would entail that the distribution of the statistic be invariant to the underlying distribution of the data (with mild regularity conditions) for all finite sample size (even though the distribution of the statistic would, itself, vary with sample size). The KS statistic is one such example.
Logistic regression is a binomial distribution conditional on the covariates: the log odds ratio for the probability of 1 is a linear function of the covariates. It makes all the assumptions for you, you don't have to assume anything on top of what it does already :)

The model for the Likert scale is called an ordinal logistic regression.

If the 0/1 part and the Likert part are determined simultaneously and are dependent on a latent variable (somebody's psychological traits, for instance), you'd have to work with some sort of an item-response model (IRT).
Regarding your first bullet point, bear in mind that people are heterogeneous. There is a small proportion of people who eat pizza constantly, a lot of people who eat it occasionally, & some people who never eat pizza. Also, there is no average American.
The errors of your observations are function of a random variables (the y's) and are therefore themselves random. Conditional on X alone, they are not given.
@NickStauner Thanks for pointing out the ordinality of the variable. Missed that. Questionnaire: the first section is a series of 10+ Likert items. These questions were constructed by our team (not a validated tool). Each item has its own importance and we would like to treat the items separately in the analysis. The section section is the Likert scale that is averaged to obtain a single score. Does this help?
i added what i think is a pretty good source (unfortunately a Textbook) w/ annotation, in light of your comment/question below my answer. I edited my original answer, so it appears at the end.
Thanks for the edit, your question is clearer.
Sounds like you've got the right idea to me. You should ask your advisor to clarify what he felt was wrong about your intuition and to provide an alternative interpretation of these tests instead of just telling you "You're wrong."
I really don't think that biostatistics and biometrics are synonyms. Biometrics includes face recognition, finger print analysis, while biostatistics involved clinical trial design and so on... Similar names only.
Just mood.
Attraction and Frequency of Thought are both only measured at time 2.
@rolando2 I eagerly await the day when a movie can be made about some foundational mathematician or field of mathematics which is both interesting to the public and adequately involves math. I don't think a 2 hour epic soliloquy of Galois on the night before his fatal duel would stand up to Iron Man IV, but who knows? This is why the only movies about mathematicians are about insane mathematicians.
'Robust' implies 'nonlinear' ... so I wouldn't generally expect linear combinations to have robust-scale-measures that are neat functions of the scale-measures of the components. Quantiles don't work that way for example, so doing complicated things with functions of quantiles certainly wouldn't be expected to.
I was hoping my answer would steer you away from that idea. ANOVA tests for *significant variance among the set of groups*. Significant variance can be present without any pair of groups being significantly different. Granted, significant variance should lead one to a stronger belief that some group dyad will have significantly different means, but no guarantees.
@chl Well this is embarrassing. Yes, I meant `rfeIter()`, although when I run it again I get a new error: `Error in '[.data.frame'(x, , retained, drop = FALSE) : 
  undefined columns selected`. Both `right.a` and `right.b` are data.frames.
See [Friedman, L., & Wall, M. (2005). Graphical Views of Suppression and Multicollinearity in Multiple Linear Regression. *The American Statistician*, 59(2), 127-136.](http://wiki.math.yorku.ca/images/3/35/Suppression.pdf)
@Achilles: $0$ is a possible outcome and is less than $2$ and so should be included.
I can put pictures in the post if you agree to CC by-sa them.
It would be more usual to define $e_i$ without the $|.|$ and then compare $|e_i|$ with $T$. What's $N^*$?
Thank you very much for the explanation! I thought that the AUC displayed the rates for all the possible cutoffs, i.e. from 0.001 to 0.999.
This approach loses a lot of information. I'm sure you can do better.
Thanks @Macro, I sure plan to!
Yes SPSS19 Glen.
But how do I make that choice? How do I choose between someone who got 6/6 correct and someone else who got 8/9?
There's also the additional issue that if they incorporate non-weak prior information the meta analysis should try to avoid double counting that information from multiple studies that use the same prior information.
... and I was typing essentially the same answer (+1) in as you hit the post button!!
It's not clear exactly what you mean by "accuracy" here. Do you mean the probability that the player who wins is the player with the objectively highest skill? Do you care about relative rankings of second, third place, etc?
There is an important distinction between a fixed value (like a parameter) and the value of a random variable. Moreover, the heart of the present question gets to this distinction: *what can be said about the probability of that ("future") random outcome?*  It therefore appears inadequate--and possibly misleading--to treat this question as being one merely about the meaning of confidence.
A "true" noninformative prior is not a distribution. So there's no prior probability such as P(sigma<1).
I'm using Mathematica. There should be something useful, I guess. Thanks for the reply.
A great ressource on my problem is Haller's and Krauss' paper on misinterpretations of significance: http://www.metheval.uni-jena.de/lehre/0405-ws/evaluationuebung/haller.pdf
@fgnu it's a long code.The statistic is called `lz` and theoretically follow a standard normal distribution. Then `lz` values below -1.65 are coded as 1 indicating a misfitting and 0 as fitting response pattern. I took the mean of 1s & 0s as type I error rate since the data were simulated based on the null hypothesis model.A sample of code can be found here http://tigger.uic.edu/~georgek/HomePage/36%20PERSON%20FIT%20STATISTICS.doc
Have you thought about trying propensity score matching?
+1 Nice reference.
Actually there is a `ci` method on the resulting boot object: http://www.statmethods.net/advstats/bootstrapping.html
Schmittlein et al. is one http://www.essec.edu/faculty/showDeclFileRes.do?declId=355&key=Publication-Content   (see first paragraph).  This will lead back eventually to Ehrenberg, Repeat Buying, section 7.2 (compound Poisson model). http://www.marketplanet.ru/filestore/0041/0037/939/repeat_buying.pdf
This is a nice answer, but the remarks at the end seem inapt: because PCA of the predictors only assesses their correlations, *it has absolutely nothing to do* with their ability to predict. As an artificial but illuminating example, try to predict the *smallest* principal component of a set of Normally-distributed predictors. If you do this with a preliminary PCA and throw out one or more of the smallest components, you will make the predictors independent of the predictand and obliterate your ability to predict altogether!
It might help your question to clearly outline the *statistical* problems you face/questions you have (rather than how you have coded it for example). Statements like "I was able to do X but not Y" aren't actually questions. Please be clear about what you want to know.
First of all thank U very much for the prompt answer. The Wilcoxon Signed Rank test was used for the individual group for within-group comparison for the related paired data i.e. between Baseline data and Endpoint data and also between Baseline data and Other Evaluable visits data for each of the parameters used, I have mentioned. So, can U please comment on this further?
If we note that dz^2=dt, we're still on the same page.

Any idea why df/dt is 0, since F(x(t)) clearly has t's in it? My initial thought was that I needed to chain rule.
@BenBolker Thanks for this. Trying to understand this more. meanflow*speed indicates an interaction. I am not completely sure what the second piece means, is that nested within the interaction? and would that allow for statistical comparisons between rivers?
@Tatiana This is not a forum; please follow the rules described in [FAQ](http://stats.stackexchange.com/faq#howtoask).
I thought I've read that Fisher never actually completed his fiducial argument or at least never made it quite consistent. An AMS article from 1964 by Dempster says that "It is concluded that the general form of the fiducial argument is appealing but that many of the restrictions imposed by Fisher are awkward or ambiguous and ought, perhaps, to be replaced."
There is actually quite a literature on this in the psychometrics field - but it's been a while since I looked at it. If you search on psychometrics and answer choice or scales or some such, it should turn up quite a bit.

There are many ways to create these scales.
Can't answer the first two, but autocorrelation is heavily used in electronic "signal processing", to help extract data from a noisy signal, etc.  I'm guessing that the SETI folks use it a lot.
Aha! That's a good tip for the conjugate prior. I didn't realise that's what it could be used for.
@whuber just curiosity.
I think you are correct that the Wikipedia expression should read $E[Z'(x_0)-Z(x_0)]$.
Your description of LSA/LSI very much resembles me [correspondence analysis](http://en.wikipedia.org/wiki/Correspondence_analysis) (CA) and I suspect that text mining acronym LSA stands for CA in statistics. CA and PCA are indeed very closely related.
Think carefully about your effect of interest, and then consider what "no effect" means -- simulate based on this scenario (if possible). Perhaps based on the underlying vectors you describe? In this situation permutation tests can be a tough sell to a non-statistical audience for two reasons (1) "The results change every time???" and (2) you won't be following a method verbatim from a standard reference, textbook, etc. Is there a more established statistical analysis for the data you have collected? Look to the literature, and perhaps supplement with a carefully designed permutation test.
If we added the statistic that only 0.00001% of the world's population receive Interview Two, you could use this same logic to say that the probability is always 0.00001%. Obviously, additional factors (such as receiving Interview One) can have an impact on the probability on receiving Interview Two, and we don't know whether how they felt is one of those factors or not. See my comment [here](http://stats.stackexchange.com/a/86039/39859).
Just to clarify, this approach assumes that you're interested in the **mean value** of the balls selected. It doesn't apply if I've misunderstood your question, and that's not what you're interested in.
@PeterRabbit If you like the answer, please express your gratitude to bluepole by accepting his answer. He'll get points.
@whuber, both solutions are equivalent. The wrong answer was taken from the question. Made a correction to the answer by deleting the wrong answer.
I'm not sure where else you posted it but it's definitely on topic here on Cross-Validated so I'd delete the other one, whatever it is.
JAGS supports 3 dimensional arrays for storing a list of matrices. Unlike WINBugs, JAGS uses column-major for storage, and like WINBugs prefers the entries to be in contiguous blocks. So, if you have $K$ groups with $\\Omega_k$ the precision associated with the $k$'th group, then you would access this in JAGS via Omega[1:D, 1:D, k]. I've successfully used JAGS for mixtures of multivariate normals doing this, so it is possible.
excellent! thanks a lot for your help!
The differences don't look (to me) like differences due to float point precision, since the interaction term itself is the same. Other variables differ.
(ctd)... and if you think it's only an approximation, why  wouldn't you anticipate rejection in a large sample? If you're interested in 'is this a good approximation?' try looking at QQ plots, which will tell you where the devaitions occur and that may help you decide if it's 'near enough' for whatever purpose you'd want to specify an approximate distributional form for.
You can program R to create the plots, but to identify the plot is the job of a human, that is the idea of the test, to see if a person can pick out the real data as being different.  This allows you to pick up on violations that you might otherwise not have thought to test for, and shows the amount of "signal" that can occur just by chance.
@Peter That's a very good point. Perhaps the best way to deal with this issue is to use orthogonal polynomials--but that can create problems with interpretation. Ultimately, being able to carry out the algebraic manipulations illustrated here will give one the ability to perform numerically stable calculations *and* derive interpretable coefficients.
Ok, the way it was presented in STATA seemed to suggest that it was more so testing for omitted variables.  So then how do I really interpret the results of this test?  Isn't there always going to be a "better" model out there somewhere?  Should I just discard my current model?
Differenced logarithms is growth expressed in percentages. In this case mean absolute error has meaningful interpretation.
No you should not bias the random sampling in any way. There isn't really a way of quantifying what is too small, except by evaluating the performance of your classifier. BTW this sampling and evaluation process is known as *cross validation* - coincidentally that is where the name of this website originates from.
@Joran, I just added the model I used. Thanks!
@JG A one unit increase in $\\log(x)$ represents an approximate 100% increase in $x$ itself. The "approximate" part comes in because derivatives hold exactly only for infinitesimally small changes.
*Don't* use $\\mu$ for *sample* means. The convention in statistics is usually that Greek letters are population parameters ($\\mu_A$ is the population mean of the A's) and Roman letters are used for sample quantities ($\\bar x_A$ as sample mean). The Wilcoxon signed rank test carries assumptions which - if your assertions are correct - will not be satisfied. Further, unless you make additional assumptions, it doesn't test mean shift, but something else. The sign test might have its assumptions satisfied, but it also won't be a test of means without further assumptions (that probably won't hold).
Please note that the term 'likelihood' has a specific, technical sense in statistics that it doesn't seem like you intend here. Another form of phrasing might head off that potential confusion, though it might suffice to simply note that you don't intend that sense.
(+1) while reading such book about topics I know is sometimes ... irritating, it clearly helps to get an outside view and hopefully ideas to explain difficult concepts to laymans.
Thanks a lot for your usefull response! I'll look into that.
@anna-earwen Any ML algorithm, whether it is kNN, NB, SVM, RF or any NN flavour is simply some heuristical fitting of an overparametrised function to a training data; an ungrateful and dangerous task which is not well stated and very prone to overfitting. However, it is pretty easy technically -- we know optimization heuristics that work fast and effective. Thus, the real work in ML is robustizing and validating models, possibly analysing them to get some information about the modelled process (tbc)
+1, there's a lot of really good advice here.
To add to @PeterFlom observation, FB is serving the second ad more (probably because of the better CTR), therefore you are getting more impressions for ad 2.
I don't think "98.34% confident" has any well-defined technical meaning. Most people would probably take it as saying that the probability of the null's being true is 98.34%, which isn't what you want.
@dmk38 - it is still true that $A_+$ and $B_-$ are not totally independent - you have to condition on $c$ for this to occur. You can see this because $P(B_-|A_+)=0.74$ whereas $P(B_-)=0.95$. If they were completely independent, these two would be the same. But because the likelihood ratios are conditional on $c$ or $\\neg c$, they are independent. I think what is happening is that $A_+$ tells you something about $B_-$, but only through its intermediate influence on $c$ ($A_+\\to c \\to B_-$). But once you know $c$, $A_+$ becomes irrelevant for $B_-$ (and vice versa)
I want to do contrasts. to show that the one region is different from the other. I guess I have to do one-way ANOVA but I don't know much about statistics, so I'm not sure
I just uploaded a couple of histograms. The one described in the question and another one more skewed.
Usually it so not so hard to do it yourself; i.e. to set up a calculation in such way, that it accepts a parameter "instanceID" that specifies which _part_ of the problem to compute. Then partition all instances proportionally to power of each processor core you have access to, and run it there; remember that rjags is single-threaded, so you'd need to run more than one instance on a single computer. e.g. in my setup I've got 2 x 4-core computers and one 2-core; so I'd have 10 cores available, so there will be 10-fold speed up, which is nice.
+1 Specifically, in a "linear model" the dependent variable $y$ is a linear function of the *parameters* but not necessarily of the data.
Because ANOVA is typically employed to identify *shifts in location,* what kind of average is used in the comparisons often is immaterial. Thus things might not be as problematic as you suggest. Moreover, it is often the case that a nonlinear transformation to achieve homoscedasticity also achieves approximate symmetry and--in regression situations--frequently makes relationships more linear, too. Although that's not a mathematical fact, it's not a matter of being "very lucky," either. Moreover, a single transformation is more parsimonious and easier to interpret than a set of interactions.
... especially because some individuals do flip from negative to positive, and that's often a product of their typical nil and TB results making small fluctuations - nil down a bit, TB up a bit, and suddenly they're positive.  Next test, they've gone back to being negative.  I can see that as I review individual results, but I'm not sure how to appropriately incorporate my intuition into a model.
@Dan when you say 'bend' are you looking to smooth the result, so that estimates with large uncertainty are moved toward proportions at nearby times with more precision?
Luna, I appreciate the good questions you've been asking here & the productive discussions that have been brought about because of your efforts. As you are becoming more active here, it would be worthwhile to become more familiar with CV's style of asking questions. We tend to discourage repeating the title, & having conversational elements such as "Hi all" & "Thank you!". The idea is that these questions ultimately become a searchable public record & that stuff ends up getting in the way.
Exactly my thoughts (Thanks, I can not put forward my case strongly). The difficulty for the consultant is that he must work with very samll target population, thus the sample sizes are low. A sample size of 100 gives a margin of error of about 10% (which I believe is acceptable). Should a margin of error be used for a sample size of less than 100 respondents. In addition, what would be the case if the target population is (say 60 and the sample is (say 15). I will be most grateful for addtional feedback on this matter.
@AVB: not so much the distribution of the object but the distribution of the scores for one particular object. I guess my goal is to: A) Make sure the score calculation is sound and not-biased towards different properties of the objects in question; and B) To be able to say something about the significance of the score calculated from real experimental data
A more detailed answer can be found here: http://cameron.econ.ucdavis.edu/research/Cameron_Miller_Cluster_Robust_October152013.pdf
(+1) It seems to me that the problem with RFs or SVMs (and more generally, any ensemble methods) is that such interactions are rarely interpretable in a direct manner. Some variations around bagging that allow to perform feature selection on specific type of predictors have been proposed, see e.g. the [logicFS](http://www.bioconductor.org/packages/release/bioc/html/logicFS.html) package.
There was a great answer to http://stats.stackexchange.com/questions/6513/predicting-daily-electricity-load-fitting-time-series by Bill that you should read to provide you with more guidance.
Please spell in full what is LDA
Sure, you are right. But I wasn't claiming that the standard deviation depends on the shape of the distribution in any way. Merely pointing out that IF you have some knowledge about the shape (or you are ready to make this assumption), it is usually a much more helpful information. In a similar way, the sample mean is a good descriptor of your data, IF you can make certain general assumptions about the distribution.
I can give a more thorough answer later, but I would suggest this paper by Paul Allison would be of interest ([Allison, 1990](http://www.pauldallison.com/downloads/Allison.SM90.pdf)).
No, there aren't any formal tests of this. And it isn't the particular *sample* that matters as much as what the variable is and what you are trying to get. There *are* ways to show that the arithmetic mean gives wrong results in some cases.
Adam, The topic of the assumptions of Mann-Whitney/Kruskal-Wallis has been discussed on this site numerous times. You may search and read. In short: you don't _have_ to assume equal distributional shape (which automatically implies equal variance) in the populations. The test tests for the so called stochastic dominance then. If you _do_ assume equal shape, then the test tests for shift of one distribution relative the other. So _you_ choose between the 1st (wider) and the 2nd (narrower) appication of the test.
how, exactly, are these being standardized?
Are these from to separate mixed models or two slopes in one mixed model?
It just says that the error terms have constant variance and are uncorrelated. This might be true and this might be wrong... but that's the default option.
charles - on Frank Harrell's book -- I strongly suggest you get hold of a copy and read it. If you only have time to read some of it, read chapter 4.