tttjjj/elt_bench huggingface dataset:
A (newer) related question with relevant answers appears at http://stats.stackexchange.com/questions/94033/standard-deviation-of-the-mean.
@UfukCanBiçici In the Bayesian setting, specific to your example, the parameter _p_ is an unknown constant, it does not change. But of course you can have model where it changes too.
Could you explain to me how did you come up with that mapping? Why the multiplication? I mean, is it something that you just guessed or does it have a mathematical reason?
Strictly speaking, it's discrete but not actually a count (well, it's arguably a count of days since an origin, but not in the sense that would lead to a distribution like a Poisson or a binomial or a negative binomial or a hypergeometric, etc - it's not a count variable in the usual sense). I'd suggest you treat it as continuous-time, because it's a measure of 'how long' since the start of the year something happens and the discreteness from only measuring it to the day should not matter for that.
Somehow related, but was accepted as a "legit" although cw-question: [What can one tell a school kid about statistics and machine learning?](http://stats.stackexchange.com/questions/22504/what-can-one-tell-a-school-kid-about-statistics-and-machine-learning)
I disagree. While one would likely be interested in the inter-item correlations for curiosity, all of the variables could be orthogonal yet still contribute to quality. For a silly example the soil in Antarctica may have optimal nitrogen content, but I doubt it would suffice as a suitable climate.
ANOVA makes sense, +1. Be careful about inference, though, as it does not sound like residuals will be normally distributed, the continuous variable being limited to [0,9].
An extension of Moran's I is to calculate the *local* Moran's I value for every unit on the map. Then plot the outliers in LISA maps, which would typically show your clusters that you illustrate. See Exercise 19 (page 138) of the [GeoDa workbook](http://geodacenter.asu.edu/system/files/geodaworkbook.pdf) for an example.
But the approximation to KL divergence is approximate, no? It's only good up to a constant scaling factor. So if the log likelihood ratio is 2, that only tells you that there is a difference of $2x$ bits, where $x$ is unknown. So it tells you essentially nothing. Plus, the approximation assumes infinite sample size, and for finite sample sizes, the KL divergence should not depend on sample size but log likelihood will. I don't see how what you're saying could possibly work.
So change "disease" in what I wrote to "medication". I assumed your matrix above would result in 4 numbers of your DV and you were showing the IV to DV relationships. The differences in those dependent variables are effects of the medication. If that's not what you mean then you really need to clarify your question. The interaction is the effect of the IVs *on* the DV, *not* some property of the IV itself.
In this case I recommend reading up on overfitting. There should be some answers around here.
@user777 You mean $\\Rightarrow$? Indeed, it means "implies".
I don't think there is a distinctive term here; nor is one needed. I agree that (e.g.) "small multiples" usually refers to repetitions of the **same** design and that your example is **not** lattice or trellis graphics. In my view any simple wording describing use of a combination  is adequate. Indeed people often just write things like "Figure 7 shows a scatter plot, histograms of the distributions, a quantile-normal plot of residuals and leverage information" without needing to emphasise that different graphs are being combined.
You will have very small power with only 4 pairs unless the effect size is huge (for example, if $x_i$ is the weight of a butterfly and $y_i$ is the weight of the tree you found it on).
I don't quite follow your question, @Monkey (although, I don't know clustering too well, so that may be part of the reason). Are you asking if there's some arbitrary value (like, say, .05) that if your data cross it, they are good?
Can you post your path diagram?
Hi whuber thanks for your reply: since I am not an expert in statistic, I simply would like to know if my two series have same shape or if they differ, and possibily how much serie1 is different from serie2.

Is K/S test suitable for this purpose? And if not, what other test can I use?
Hi Zhubarb, that´s a good point. I already did, and I know the separations. The problem is that, I previously know the 'separations'. And, with this separations, I can´t do an only single Neural (for example). With my data, I would have 50 neurals... there is a mix of a tree with SVM for example ? That I would train only one SVM (with the whole data), and the tree can separate this "divisions" firstly?
You cannot prove anything using statistics. A proof is meant to be exact. Statistics is about probabilities. Even a p=0.99 result of a Chi squared does not "prove" that the underlying distribution is not normal. It's just damn unlikely that it's normal.
probably worthwhile to note that to use mgf you need to take fourth order derivative of $\\exp(t^TSt/2)$ and set $t=0$.
I'd certainly be happy to treat the two rolls as iid, since it will be so close to true as to be pretty silly to do anything else - though it won't actually be *exactly* true. Dice, for example, [undergo wear and tear](http://img.photobucket.com/albums/v521/hentzau/photo13.jpg) so every time one is used, it causes a very small amount of wear. If I had to do a million rolls, I couldn't treat the first and last roll as identically distributed. I assume that's the sort of thing you're getting at with the use of quotation marks in the last paragraph.
If you don't actually care about the specific parameter values of the functions, and instead want to simply establish whether relationships (linear or non-linear) exist between your variables, I suggest you look at Generalized Additive Modelling, which will flexibly/adaptively accommodate both linear and non-linear effects.
@John, if you were to generate data from that distribution, one way to do that would be to have $99\\%$ of it from a $t_{100}$ distribution and $1%$ of it from a $t_1$ distribution. Well, that $1\\%$ will be extremely long-tailed and, as such, will occasionally produce extreme outcomes, leading to the perhaps counterintuitive result that the variable's mean doesn't exist. It's not always clear by looking at a plot of the density function that the mean will not exist - for example, the difference between a $t_1$ and $t_2$ density is subtle but one has a mean while the other doesn't!
I think it does. I've since taken chl's suggestion and am doing Procrustes analysis instead. Thanks for your help.
I must say, this MLE for c based on order statistics is pretty nice, although the derivation in the chapter above takes some work (not too hard though) - nice illustration that the essence of MLE is in the argmax (of course!), rather than the derivative (as you pointed out, and I fully agree, it occurred to me to work upstream of the "usual" derivative step (i.e. just worry about maximizing, by whatever means), but I didn't pursue).
The standardized variable is not the raw variable so you are not violating any "prior" by having negative values. In fact you're guaranteed to have negative values if the variable has non-zero variance. A more important question is: why are you standardizing? When you standardize, the result is interpreted as the number of standard deviations above/below the mean. That interpretation is particularly meaningful for normally distributed data but non-negative data is quite possibly skewed, so I am curious why you decided to standardized. Is this a predictor in a regression model, or...?
Generally, it would be great to test fitness against *any* distribution - just clarified this in the question, sorry if it was confusing. Re my `ks.test` being wrong: aha, I missed that the second parameter must be CDF - in this case, `ks.test(sbux.returns, pnorm, mean(sbux.returns), sd(sbux.returns))` should be correct, right? But it gives `p-value = 0.01134` which also doesn't seem quite right, given the density and qq plots I've got.. All in all, if my question is more clear now, do you want to put your comment as a separate answer?
I performed the test, however, I used full_recommendations=c(1)+c(2)*dum_earnings, which resulted in the following output [link](http://static.afbeeldinguploaden.nl/1407/72876/p4HVhYs.PNG). As you can see it is not significant (this result I also hoped for). However, which tests would you advise? And how should I interpret these results? Normal it is 0.77 percent and during a recommendation 0.89 percent?
Excellent, this makes perfect sense - many thanks for solving my problem so quickly!!
This could be a start: http://cran.r-project.org/web/views/HighPerformanceComputing.html
+1 for not only answering the question, but also providing useful advice.
@sufeipopo No need to thank me. You can just click the check to the left of the response to select it.
This is time series data .  You should first consider something like a seasonal ARIMA model rather than do regression on time. The differencing and seasonal differencing can handle the trends.  This does not sound like a data mining problem.  It sounds like a standard time series problem.  if you have covariates that are fixed or time varying i am sure you can incorporate that in the model.  The problem with fitting simple trends and seasonal terms like a sine or cosine of time is that there may still be autocorrelation in the residual series, something ordinary regression doe not account for.
Could you fix this up so it's more understandable? The link to the original post shows what caused an error. How did you fix it? What did you do to get the result you link to?
(ammendment to prior 2¢ *reported* p-values would not be unbiased random variables...you've gone through the garden and picked the best cherries.)
Yes, the conversion to the factor-graph is correct. Also, this is very useful: 
http://nlp.cs.berkeley.edu/tutorials/variational-tutorial-slides.pdf
I added the meta-analysis tag. It seems clear to me that this is a meta-analysis problem: how to combine some measure from different experiments/publications.
In R, there are several versions of a runs test (function and (package): runs (TSA), runs.test (tseries), and runs.test(lawstat). The first two show p values < .05; the last doesn't work for me. Haven't looked under the hood of any of them.
A bit late, but pivoting is a helpful strategy for numerically unstable.
For some reason this code doesn't work if I use `set.seed(1)`. Gives the error message: Error in integrate(Vectorize(f), 1, max(d$x)) : maximum number of subdivisions reached
@whuber - Good points; I was thinking along the lines of McNemar's test.  I've added an example that illustrates what I have in mind, as well as your 3-group comparison.
Thank you very much for your clear answer. I will definitely try the approach you suggested.
You seem do have done 2 independent simple MDSs. Instead, consider one weighted MDS (INDSCAL model) with two matrices (groups). Even better you could do INDSCAL with all 40 matrices and analyse there appear systematic group differences afterwards.
You have not clearly described the situation. Are there 5 objects each of which was subject to both methods once (paired data), or a single object subject to ten experiments?
Can you provide a bit more detail about the response variable and the experimental design? What are the other treatments? If you can provide a few lines of R code that produce an example dataset with the right structure, you're more likely to get some answers.
many thanks for pointing this out to me, I had completely missed the reference to the weights in the documentation.
added homework tag, due to original wording of question (no context, poor wording, etc)
There is a nice article / tutorial in [R Journal, June 2011](http://journal.r-project.org/archive/2011-1/RJournal_2011-1_Poisot.pdf)
Yes, and clusters are not necessarily nice round groups of points, which is basically what kmeans assumes.
Since this is homework, can you explain what work you've done so far or what part of the problem is giving you trouble? We prefer not to just solve your homework for you, since then you don't learn very much...
@whuber: the probabilities can be plotted against the empirical frequencies to get what's called a calibration plot; the points should be roughly along the diagonal. I don't know if one could do a more quantitative analysis, this isn't an area I know a whole lot about, just a few things i've picked up here and there.
Is the question about understanding the mathematics and/or mathematical formulas behind the mentioned quantities or is it about *numerical algorithms* to actually *compute* them? Strangely enough, they're *very* different questions.
1) The $-1$ comes from the definition of [Dirichlet distribution](http://en.wikipedia.org/wiki/Dirichlet_distribution). 2) and 3) The notation is horrible (in the slides), there are typos and missinterpretations. Try to find a better reference such as a textbook.
I am beginning to doubt the accuracy of this proof.  The result in Saunders maths implies only $n$ non linear constraints on the $d_{jk}$.  This makes $d_{jk}$ only have $n$ degrees of freedom instead of $2n$.  However to get to the $\\frac{n(n-1)}{2}$ conditions a different argument is required.
I am not clear on what you  are trying to do. You seem to have left off some text after "crosscheck with the ..." and I don't understand your description of the sample; it sounds like you might be describing the results of a frequency analysis. Having 60 interviews certainly makes it *possible* to get signifcance, but you first need a hypothesis.
I checked it with a SPSS function and, yes, you are right - it's a typo in the book.
$Awesome$! Thank you for the addition.
I did not realise that you had edited your question. My answer below is for the question as you had originally set up. The answer to your updated question requires a substantially different discussion of time-varying cointegration models. I suggest you roll back this question to its earlier form, and ask make a new question out of the current version.
I found Statistics in a Nutshell to be seriously flawed in terms of wrong/missing figures, mistakes in formulas, bad explanations and the book doesn't even have tables for critical values. This is especially bad at places where the authors write "and since the critical value for this is foo, this is significant", leaving the reader totally unclear about where this foo value comes from. The book does have a good intro section but should be edited eventually to make it good. Just look at the errata page for the book and be stunned at all the errors.
Thank you for your explanation. My naming conventions come from "Kleinbaum & Klein - Survival Analysis" (p. 63ff). They define w(t_j) = 1 for Log Rank, w(t_j) = n_j for Wilcoxon, w(t_j) = n^(1/2) for Tarone-Ware, w(t_j) = s(t_j) for Peto, and a rather difficult expression for Flemington-Harrington. I don't know which weights I will need in the future but I want to be sure that I am able to apply them before I need them :) But I think your answer will help me with this problem. Thank you!
This will get the ball rolling. $g(x)$ has indeed as simple analytical form, but not a polynomial one. It will make my problem simpler if i could re-express $g(x)$ as a (or even several) polynome(s), even very complicated one(s). Wiggly is okay, so long as i can make it more precise by adding more terms.
The dependent variable was measured on a 1-5 Likert Scale, Thanks
Thanks Peter.. But, what if I havve, for example year 1,2,3 as 4, 3.5, 5. Then I can no longer use the geometric mean (this is a more accurate representation of the situation I am in, sorry for not clarifying this).
But yes, maybe the weights are meant to produce that, but since I have been urged to use weighted averages, it seems this is not what they are meant to produce and rather be pushed more towards the larger increases/decreases. Thanks again.
See also [julia](http://julialang.org/) and [does-julia-have-any-hope-of-sticking-in-the-statistical-community](http://stats.stackexchange.com/questions/25672/does-julia-have-any-hope-of-sticking-in-the-statistical-community). (Imho, visualization, tutorials, sw components, users are more important than raw speed: different topic.)
In both cases I think a good starting point is thinking through explicitly what your null hypothesis from the Chi square test is, and how you would describe and interpret that null hypothesis.  Does it make sense?
Good point something like "positive relationship between" or something which avoids some kind of underlying mechanism would be better.
+1 Please note, though, that a covariate which is *completely orthogonal* to all other independent variables can still be uncorrelated with the dependent variable yet be significant in the ANCOVA.  This is explained and illustrated at http://stats.stackexchange.com/a/28493.
Thanks for the great answer! So I'll leave in the random effect (for the sake of consistency across DVs).
1) I have a difficulty of understanding to see what an independent cause is before defining anything about D-Separation. Many authors define the D-Separation by using intuitive cause-effect relations. I try to build a reasoning system based on what I am reading from different sources and based on my intuitions so I can come to terms with this Theorem.

It is like the following: "If no variable is observed other than X, then knowledge about X can influence X's effects (all descendants), X's direct or indirect causes(ancestors) and all the other effects of X's causes."
@PeterFlom, $\\LaTeX$ is "\\$\\LaTeX\\$".
There are problems with p values from F-statistics for mixed effects models (google something like "why are there no p values with lmer/lme4"). You could calculate your own if you really wanted with the "pf" function. You could also use lme from the lme4 package. You probably want to choose between (1|subject) and (block|subject) for your random effects term. Also, there is no data call in your lmer model and lmer is in the package lme4 not nlme.
It seems to me you may be overcomplicating the situation and that a simple restatement of the problem will point to good solutions. Neither $Y$ nor $Z$ appears in isolation in the problem statement, so you might as well suppose you have collected *bivariate* data $(x_i, u_i)$ where $u_i = y_i\\cdot z_i$. In these terms your problem is the general one of regressing $U$ against $X$. This opens up the entire apparatus of regression for application here.
This seems like an interesting issue but the length of your question is sure to discourage folks from reading it. Is there no way to state your question more concisely?
Please try to use the latex formatting for your math-- it will look much prettier and more readable. Enclosing your equation lines in dollar sings will improve the appearance a lot.
this is just element-wise multiplication. i'm not sure if it works in WinBUGS, OpenBUGS, or JAGS.
... In other words, all the CI is telling us is that in a population roughly similar to ours we would expect 95% of samples taken from that population to reflect the true value +/- the margin of error. So all we're doing is giving a very rough clue - though perhaps the best clue we have - to around how close our sample statistic might be to the true population parameter. If so, then it sounds like we shouldn't take the exact numbers in the CI too seriously - they just mean something like, "the sample statistic is probably roughly accurate to probably roughly this degree." Did I get that right?
Hello - interesting answer.  Any interest in having an offline conversation about this?
For the questioners sake, 2 standard deviations is actually about 0.9545. Using 1.96 standard deviations is more accurate for 0.95. This is tagged self-study, and if it is to be turned in or a similar problem appears on a test, your instructor might be a stickler about it.
I guess that mathematical statisticians have invariance and equivariance criteria for different kinds of parameter. I am reacting to @Vinux's line that location indicates central tendency and the idea that location and central tendency are the same ballpark. That's probably loose at best by mathematical standards, but it's a data analytic view.
The chance that any individual subject in the sample is in the highest $5\\%$ is, of course, $.05$. This is a Binomial random variable, whence the chance that at least $r$ subjects are in the highest $5\\%$ is given by the (complementary) CDF of a Binomial distribution with size $n$ and probability $5\\%$.
The input variables are all scaled between 0-100. The CPU and memory usage was already percentage, I used max-values for other variables in the dataset & converted them to percentages. Now would you consider [z-score](http://en.wikipedia.org/wiki/Z-score) as a better option to scale variables to a range, rather than converting them to percentages... Secondly, do you consider [SOM](http://en.wikipedia.org/wiki/Self-organizing_map) as a better option than k-means, because with SOM SOM the neural networks would deal with parameter's weighting and normalization is just question of initialization.
Is "I presume you want a non-technical answer here." entirely compatible with "Assume a vector of data y which were generated by a probability distribution indexed by a parameter vector theta with k elements."?
No you can't just swap the hypotheses, unfortunately. And, generally, to get a workable test, the formulation gets modified a bit to be of the form $H_0: |\\beta_1 - \\beta_2| \\geq \\Delta$ vs. $H_1 : |\\beta_1 - \\beta_2| < \\Delta$, for some prespecified $\\Delta$. This arises often in bioequivalence testing.
+1 Great point about how this doesn't deal with splitting up the cross-validation.
Not comprehensive at all then. Thanks.
What is cv.lm? If it's a function, which package is it from?
@AA In Python: [scipy.cluster.hierarchy](http://docs.scipy.org/doc/scipy/reference/cluster.hierarchy.html) ([example1](http://nbviewer.ipython.org/github/herrfz/dataanalysis/blob/master/week3/hierarchical_clustering.ipynb), [example2](http://nbviewer.ipython.org/github/herrfz/dataanalysis/blob/master/week4/clustering_example.ipynb)). Or to be more precise, use [scipy.cluster.hierarchy.linkage](http://docs.scipy.org/doc/scipy/reference/generated/scipy.cluster.hierarchy.linkage.html) with `method='centroid'`, to get "hierarchical k-means" (though, `'average'` and `'weighted'` may by similar).
If I understand them properly, the validation set is used to calibrate the tuning parameters.
@user1396: I think I got it; a '2' in the i-th element in the membership vector is telling me the i-th vertex belongs to community 2. correct? :)
Can you summarize in plain English the above procedure? It would certainly be useful for the OP to get better than a series of formulae and results.
... but you can use fractional Kelly systems to decide whether to accept a wager, or to decide between two advantage gambles.
(cont'd) Now, if I were to subtract 80 from every one of the resampled estimates, I believe I would end up with a 90% CI of -40 to 40.  This is where I get a bit confused as what this is telling me is that the true population value falls between -40 and 40 which is quite far off from what I observed.  Am I missing something?
@Erik Thank you for pointing this out.  You are correct about the PDF; I should have stipulated that that requires a (simple) adjustment.  If one follows strict typing and units of measurement procedures, it becomes obvious where such adjustments are needed and where they are not.
This paper just must appear in a context: http://www.biostat.wisc.edu/~page/rocpr.pdf
I hope you're also recording the standard errors of parameter estimates as well as information about temporal correlation of those errors, for otherwise you may have quite a bit of trouble distinguishing real changes from changes due to random fluctuations.