instruction
stringlengths
9
38.7k
Suppose I have $N=10$ participants. For each participant, I have $M=100$ consecutive answers, which are either correct or incorrect. My hypothesis is that the probability of giving a correct answers decreases with time. Can I analyze the data with logistic regression? I would like to do the analysis separately for eac...
Suppose we have a multinomial distribution with support $(X_1,...,X_n)$ and $\sum_{i=1}^nX_i=N$. Consider the probability distribution of $X_1/X_2$, say. Does this distribution have an expected value and variance? If so, can they be calculated or approximated? The reason for the question is that in the limit as $n\righ...
I have the following issue. I want to perform clustering based anomaly detection on high dimensional timeseries data. To be able to do so I'm performing PCA before clustering, and before that I'm performing standardization of my parameters. Here is the problem - a number of parameters has a lot of spikes, but these are...
What follows is a basic question concerning Binomial GLM's. Suppose we have a set of observations where a binary response was measured in three different treatments, A, C and D - treatment = c("A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "C", "C", "C", "C", "C", "C...
I have performed a clogit with the package survival in R. The aim the work was to estimate the willingness to pay from a discrete choice model. The choice set was composed of 4 attributes, 3 of them with 3 levels and the attribute price with 5 levels. In particular the price was composed by the levels 20, 40, 50, 70 an...
Suppose I have a multivariate discrete random variable $Y=(Y_1,\dots , Y_n)$, where $Y_{i}$'s are independent and not identically distributed Binomial variables. How can one calculate the entropy of $Y$?
So I'm reading some research papers on machine learning applied to classification algorithms and one of the steps in the algorithm psuedo-code says: "Obtain classification prediction P from machine learning classification algorithm". My questions is what does this multiclass classification prediction P look like?
Consider the following deductive argument, in the form of a paragraph: Drugs use should be legalised, because it is an attack against individual freedom, which is a founding element of our societies. At the moment, the state is prohibiting that freedom to people. This argument can be reconstructed into the "standard ...
I have a dataset (300,000 samples) of grey scale images of dimensions 32x32. There are two classes and the samples are almost equally balanced. I am trying to achieve binary classification based on the variations in the image, especially on the boundary pixels, i.e., images which have mostly uniform intensity will be l...
I don't understand what exactly is the difference between "in-sample" and "out of sample" prediction? An in-sample forecast utilizes a subset of the available data to forecast values outside of the estimation period. An out of sample forecast instead uses all available data. Are these correct? Very specifically is the ...
I am currently working on a topic where I know that the distributions of the output and of the covariates will shift. I know for example that some covariates will at least follow the inflation rate. The goal is to predict the output over time, based on time series. As far as I understand machine learning methods, they ...
For a design study, I have protocols from 5 different design groups with two persons in each team. The verbal utterance of each group (two persons) are transcribed for each sentence. The data are derived from each line of transcription for the analysis. I want to analyze two cases: I want to compare the differences be...
I'm working with biomedical data and the available data sets comprise 500,000 cell measurements. Each data point refers to the measurement of an individual cell and the features (10 in number) pertain to different antibody counts. Given some of these measurements, a patient is diagnosed positive or negative for a parti...
Are there data clustering algorithms which by definition require human judgement as part of the algorithm? What I mean is that once in a while the algorithm presents the human operator (or any other species of operator) with a query of whether some objects (not necessarily from the original data set) should be grouped ...
I want to implement a microservice that calculates the Success Rate of each Participant. This success rate is then used for evaluating their Probability of Occurrence, for instance, a Participant with higher success rate is more likely to get a task, and vice versa for the one with lowest success rate. After a certain ...
So recently I've been playing on an online roulette and after some time on this site I detected a pattern the roulette has, like I have the feeling when the green will come out for example. Is it possible to create a script based on the roulette's code and that way getting at least probabilities of what will come next?...
I know that K-means algorithm stops when the cluster assignment does not change or just changes a little. Apart from that, and defining the maximum number of iterations, is there any other stopping condition?
I have conducted Prospensity Score Matching (in R using the R-package "Matchit"). I used the matching method "nearest neighbor". After matching I compared the treatment and the controlgroup in terms of their outcome variable. For this comparison I used t-test. I discovered that after each matching procedure the results...
Consider the following hipothetical data. $A_t$ is a time-series tested to be I(0) with one known structural break and $B_t$ is another time-series on the same data set also tested to be I(0) with a structural break in another period (not the same as $A's$). If I regress the following model: $$A_t=\beta_0+\beta_1B_t+\...
Is it correct to say after passing raw logits from a model inference through a softmax activation layer, I effectively obtain the probability prediction for each class? If so, is it more accurate if I obtain the class prediction using something like np.argmax(predictions, 1) to obtain the index (i.e. the class) of my p...
I have two datasets, one on which I have my covariates $X_1$ and my observed outcome $Y_1$, and one on which I have only my covariate $X_2$. I want to predict $\hat{Y}_2$. However, I have far better indicators ($R^2$ and $AIC$ or $BIC$ for instance), if I estimate on the log transformed model : $$ ln(Y_1) = \beta X_1 ...
I'm comparing two Gini results from two distributions of income, in which one income is a source of the other. Let, say that Gini_1 = 0,770 and Gini_2 = 0,373. Clearly, Gini_2 shows a less inequal income distribution than Gini_1. However, what more can we say about that? I'm expecting to find an answer such as this one...
I have an interesting real world problem that can be abstracted and decomposed into a pattern recognition problem - specifically, recognising "known configurations" from within a 2D plane. The problem can be described as follows: Given an MxN matrix (see image on left in the figure below) Given that each cell in the M...
Is it true that for two random variables $A$ and $B$, $$E(A\mid B)=E(B\mid A)\frac{E(A)}{E(B)}?$$
I want to study chi square test of homogeneity from any authentic source- book / website especially problems where samples are compared for more than one attribute. Chi square test of homogeneity is a Chi square test that determines whether two or more independent random samples are from the same or different populati...
I need to generate 24 hour forecast for 600 different time series. All these time series are basically hourly electricity prices for different pricing nodes. I wanted to understand if there is a way through which my number of models to be built for these 600 time series can be reduced? or Is their a method through whic...
This paper: Spiegelhalter, David J. "Funnel plots for comparing institutional performance." Statistics in medicine 24.8 (2005): 1185-1202. describes funnel plot limits for indirectly standardized rates (such as mortality rates), along with a number of other types of measures. However, thus far I have been unable to fi...
Consider the problem of semi-supervised learning where, in each round, the labels of all data points are guessed and then the label of a random data point is revealed. As the labels of more and more data points are revealed, the accuracy of the predicted labels should increase. A plot comparing the accuracy of the pred...
I have the following question, and it is (for me) an open research question. I really don't have a feeling if it is a difficult question or a trivial one, getting a better feeling for approaches I might take by your feedback would be much appreciated. I won't explain what I have done so far to not make it too complicat...
Let's say I want to test phone messages. I have identified a couple of elements I want to test and I have a few variations of each: Music - no music, some music, continuous music Voice - male voice, female voice I'm trying to understand the better breakdown for A/B testing. Should I test all of the Music variations ...
I need to study for a certain job admission test and one of the topics is Estimation and decision theory". So my question is: what likely is that I'm going to have to study? I was thinking on interval estimation and hypothesis testing but is that all? Or is there something I'm missing?
I'm doing an EFA on a scale that was designed to quantify LSD's effects. However we have a applied it in patients receiving Ketamine. We are doing the EFA because we wan't to see which items of the scale are relevant when applied for this purpose. What I'm trying to understand is that when I run the EFA in SPSS, the fi...
Why the optimal classifier is called "Bayes". I do not see the connection with being Bayesian or so. Edit: This question asks about naming. Not about math. Another phrasing of the question: Given that the Bayesian classifier is optimal (under certain constraints) does not explain why that particular classifier is cal...
I came across the following model in an internal paper: $∆y_t=\beta (\mu-y_{t-1} ) +\kappa(x_{t} -\alpha y_{t-1} ) +\epsilon_t$........................(1) In this the first part : $\beta(\mu-y_{t-1})$ , signifies the mean reversion while the second part : $\kappa(x_t -\alpha y_{t-1} )$ , signifies the last forecast...
Edit: Clarified by including the overall question I need help with and the experimental questions of my project. Overall question to you (ie, what I need help with): Does this experiment sound like a Randomized Complete Block Design and if so, do you include interactions between block and fixed factors in your model (u...
I have a question about the Gaussian assumption of Kalman filter in detail. I'll lay down some equations first Assuming $x_{t|t-1}$ is your prediction of the state space at time $t$, then the innovation $v_t = z_t - H_t\,x_{t|t-1}$, where $z_t$ is the measurement at time $t$ and $H_t$ is the mapping Then we do the actu...
I have a sample of size 30, being studied for effect of a surgical procedure on certain substance concentration in blood, In other words, for comparing a measurement change before and after a procedure in a sample of size 30, which test should I use? Wilcoxon signed-rank test or paired t-test?
I am not a statistician, but I do have some experience within the field. I am currently in need of analysing a data set in which there are a few explanatory variables for each subject, and the dependent variable is a sequence of percentages, where each percentage indicates how large a share of their income the subject...
I want to calculate sex and age adjusted odds ratio (simultaneous adjustment) in addition to 95% CI. The dependent variable is disease (0 or 1) The independent variables are age (continuous), sex (0 or 1), and blood sugar (continuous). How to calculate the sex and age adjusted odds ratio? Which one of the tests should...
I have hourly weather data for a number of weather stations in radius of some 300 kilometers, for second half of the last century. Missing values range from few hours to a whole month. I am working with variables: T, RH, rain, wind and sol. radiation. I need to impute missing values so that in order to evaluate models ...
In terms of neural network lingo (y = Weight * x + bias) how would I know which variables are more important than others? I have a neural network with 10 inputs, 1 hidden layer with 20 nodes, and 1 output layer which has 1 node. I'm not sure how to know which input variables are more influential than other variables. W...
I try to fit a model to the density function by regression to get a parameter estimation. It seems to work well but the parameter estimations from the nlxb function producing no good values and so the predicted model in comparison to the kernel densities is quite bad. Maybe somebody knows how can I improve the paramete...
Can I apply a bootstrap from 2 samples that have different non-parametric distributions to get their mean difference? Can I do that with 2 group of data, that are non-parametric and have different distribution? Because in the other questionexample, it didn't say if the 2 samples had the same distribution or not. EDIT: ...
Dunn test for two groups is equivalent to Kruskal-Wallis. The null is the absence of stochastic dominance, but if we impose some more restrictions we can assume that the null is the equality of medians, $H_0: M1 = M2$. Apparently, the Dunn test statistic is assumed Normal, but it is computed in rank terms, not in term...
a time ago I measured air pollution with a device I made and this is the plotted data, and it seems that the pollution remained in the device over time. There is a way to fix the increasing mean? it is posible without transforming the data? Thank you!
I am trying to build a non-parametric model to predict pure premium of an insurance policy. Pure premium is simply the expected claim amount of an insurance policy.The problem is, most insurance policies do not result in claims and so the data set has a lot of zeroes in the response variable: over 90% of the observatio...
In a leave-one-out cross validation test, I am calling a ridge regression model for the training samples, and predict the response for the test samples. And my metric for the accuracy is whether the samples are ranked correctly (i.e. spearman correlation) after I get the predictions for all samples (i.e. all folds). In...
I am comparing two categories (A and B) of social media posts with the corresponding number of likes for each one. I am taking samples of equal size from each category at random and performing a Mann-Whitney U-test using scipy.stats module in Python. I have chosen U-test since taking the mean of A or B data does not m...
After reading this answer, I am not very clear on how to get to the formula of VIF ($1/1-R^2$) as part of the variances on the diagonals of the variance-covariance matrix of the coefficients, if auto correlation exists. How is the VIF formula derived? Thanks.
It may be a weird question at all but as a novice to the subject I am wondering why do we use regression to detrend a time series if one of the regression's assumption is the data should i.i.d. while the data on which regression is being applied is a non i.i.d?
The problem I am trying to solve is to find if presence of a particular tags/topics in an article make it viral.(Page views is my metric) The data I have is the article tags and the number of page views it received. My data looks something like this. ArticleA => [tag1,tag2,tag3,...,tagN] => PageViews(ArticleA) I have ...
Why are they called "machines"? Is there an origin to the word "machine" used in this context? (Like the name "linear programming" can be confusing but we know why it is called "programming.")
I am learning generalized linear models, and I there I suddeling find expressions like "modelling the mean". Also on this site, I find the sentence: "Instead of modelling the mean as was done for simple linear regression, we now model a transformation of the mean so instead of saying μi= ..." When learning ordinary lm ...
I fitted my data to GRM, got the information curves and try to interprete the pictures. I'm new to IRT and still don't get a lot of things. Here I can observe that the items are pretty good and measure what we actually meant. The best item is Q15_3, but what do the peaks mean on this green curve, why is there a lot of...
Correct me if I am wrong: both Kendall’s tau and Spearman’s rho are will result in the same conclusions with respect to whether the value of the underlying population correlation equals zero. I am applying both tests on the same data in Python's scipy, for some data .When the result is significance, I get slightly dif...
I came across this in lecture but failed to understand why: Why does maximum likelihood estimation have issues with over fitting? Given data X and you want to estimate parameter theta. An example would be helpful.
I'm trying to find an elementary derivation (proof was the wrong word) of the Horvitz-Thompson estimator: $$ \hat{Y}=\sum_{i\in s}\frac{y_{i}}{\pi_{i}} $$ where $i \in s$ if and only if unit $y_{i}$ a sampled unit is in a sample of interest, and $\pi_{i}$ is the probability that $y_{i}$ is in the sample of interest. My...
In the book by Christian Robert and George Casella on Monte Carlo Statistical Methods, they use an argument of LLN on pages 551 and 552. I'm attaching the argument in this screen shot $t$ is representing time. $i$ is representing the Monte Carlo sample so that \begin{equation} z_t^{(i)} \sim g \quad\quad \text{is the ...
Am currently working on a Stochastic Poisson process on my project. I have thought and settled on the below scenario which I think is appropriate. However, solving it am not getting what I expect. I want to cross a road at a spot where cars pass according to a Poisson process with a rate of lambda. I will begin to cro...
I am fitting a model in R with the glmer function of the lme4 package. For one of the variables I use a 3rd order orthogonal polynomial. I now want to plot each polynomial's order in a separate plot to determine how each of the 'single' orders vary across different subjects. I apologies that this is not the proper term...
I am currently working a some datasets with count data in R, in which the response is the number of activities of a given type that were performed in one day by a population. For each type, I build a Poisson model and test for over/underdispersion using the function dispersiontest() from package AER. Depending on the ...
I need to demonstrate an impact of implementation of incentives or penalties for decision-making on a scale of society. For example: If you increase taxes alcoholic drinks it should reduce the number of people drinking but by how many? How effective will it be? There must be a mathematical theory exploring this field b...
This is for a homework assignment, and I want to make sure that this is a result of a bug in my code and not in my understanding. I have a sample of x vectors from a training data set $X_{train}$ with 100 points and 100 dimensions, and a set of 100 y values $Y_{train}$ that I am trying to do linear regression for. The ...
I have an observation and I want to transform it to a normal distribution. I have checked the normality assumption but it didn't attain the normal distribution. I have tried different function to transform it to normal distribution but it didn't work out. here under the Q-Q plot and density plot of the data. Could you ...
Until now I had learned that the variances of Bernoulli and Poisson random variables are $p(1-p)$ and $λ$ and that for fixed $p$ and $λ$, these variances are constant. Now, introducing glm, my course says: - linear model: $\quad Var(Y_i)=σ^2$, where $σ$ is constant - binomial model: $Var(Y_i)=μ_i(1−μ_i)$ - Poisson mode...
I'm learning neural networks, and wrote a network from scratch using numpy and pandas. I'm training it using stochastic gradient descent to predict house prices. The dataset is right-skewed, I mean-normalized variables other than the target, the predictor variables are of types binary and numerical. The activation func...
I am quite embarrassed to ask you this question but I am stuck. I have to compute the following conditional expectation : $E[\theta|x_i,y]$. I know how to compute the basic E[X|Y]E[X|Y] but I definitely do not know how to compute E[X|Y,Z]E[X|Y,Z]. Can someone please orient for the first step? with $\theta\sim N(0,\sig...
I am trying to run the glmer() function on results from an experiment I conducted. The dependent variable, FirstResponseKey, is a binomial variable (0\1). The model looks like this: mflicker <- glmer(FirstResponseAccuracy ~ 1 + Aware*lag*SameLocation + (1|Subject), family = binomial(link="logit"), dat...
i just tried to analyzed data using mvpart, then when i use decostand Hellinger and Normalize ,they gave different result. so whats the meaning of them
newbie here with a question: I have a study in 40 subjects (similar amount young vs old) testing time to muscle fatigue (meaning no longer able to perform the task); each subjects performed this test at 60, 80 and 100% of muscle power, with varying succes numbers. I want to know the % that best differentiates the 2 gro...
I have seasonal time series (with frequency of 30). I am fitting ARIMA models using R library forecast. My first ARIMA model would be (1,0,1)(1,1,0)[30] with fitted parameters: Coefficients: ar1 ma1 sar1 drift 0.6957 0.2992 -0.4496 0.8204 s.e. 0.0266 0.0398 0.0252 0.0597 sigma^2 estima...
I am very confused with one of the derivations used by this paper http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.409.2389&rep=rep1&type=pdf in pg 1021 of this paper. It is a simple use of the applications of bayes theorem. Note $y^t=y_{1:t} $ and $x^t=x_{1:t}$. It uses this fact that $p(y_{t+1},x_{t+1}|x_t)=p...
In a longitudinal study, outcomes $Y_{it}$ of units $i$ are repeatedly measuret at time points $t$ with a total of $m$ fixed measurement occasions (fixed = measurements on units are taken at the same time). Units are randomly assigned either to a treatment, $G=1$, or to a control group, $G=0$. I want to estimate and t...
I have lots of time series data - water levels and velocities vs time. It is the output from a hydraulic model simulation. As part of the review process to confirm that the model is performing as expected, I have to plot each time series to ensure that there are no "wobbles" in the data (see example minor wobble below)...
In a paper I came across 'non-parametric bootstrapping', which I hadn't heard of. It's used as a way to deal with small sample sizes. But my question is not yet about whether that is appropriate (cf. this question). I'm still trying to understand the basics. I read this, but am still confused! example case: Suppose the...
In "Data Analysis" by D. S. Sivia, there is a derivation of the Poisson distribution, from the binomial distribution. They argue that the Poisson distribution is the limiting case of the binomial distribution when $M\rightarrow\infty$, where $M$ is the number of trials. Question 1: How can that argument intuitively be...
What is the aggregate variance method for estimating the value of Hurst exponent? How does it measure long range dependence?
I am training a neural network for multilabel classification, with a large number of classes (1000). Which means more than one output can be active for every input. On an average, I have two classes active per output frame. On training with a cross entropy loss the neural network resorts to outputting only zeros, becau...
My study consists of data from both men and women; I wanted to correlate their answers to yes/no questions to their enjoyability in a course on a scale from one to ten. What would be the best statistical data test to use to correlate the yes no data to 1-10 scale data while keeping it divided between men and women? Can...
I ran a MANOVA on 3 DVs against 2 IVs (2 levels each factor, so 2x2) and found no interaction effect, but I found a main effect for one of the IVs. Would it make sense to follow up with a discriminant analysis, especially since the univariate results were not significant? EDIT to include research question: My 3 DVs are...
I have been reading about the Nyström method for low-rank kernel aproximation. This method is implemented in scikit-learn [1] as a method to project data samples to a low-rank approximation of the kernel feature mapping. To the best of my knowledge, given a training set $\{x_i\}_{i=1}^n$ and a kernel function, it gener...
I am trying to find a reasonable and largely uninformative set of priors for the error variance in a multi-level model. The model was developed by others, and I am unsure whether their choices were optimal. The data consist of $J$ observations for each of $N$ individuals (a typical data structure would be $J=8$ and $N...
Let's say that I want to examine whether rain affects the number of patients that will check in a hospital with respiratory problems. So my data looks like this: Case 1: There were $\boldsymbol{n_1=100}$ days with No Rain. In each day a different number of patients were examined and diagnosed with respiratory problem...
This is a residual vs. predictor plot for my regression problem. All the other residual plots don't show clear non-constant variance, but this one definitely stands out, and its variance is not monotonic as x42 increases. I've tried variance-stabilizing transformations (square root and log) on y and it doesn't work, qu...
I perform matrix factorizaition in my data using the sklearn implementation of Non Negative Matrix Factorization. In the evaluation process I am removing some values from my initial dataset and I am trying to see if the approximation matrix of NMF can predict well those missing values. What I have notice from the exper...
A population consists of individuals with wealth $W$. They each form a portfolio $P$ which consists of relative weights corresponding to investments in $n$ assets. So if the portfolio for some individual is $[0.1, ...., 0.1]$ with $n = 10$, then that person has invested 10 % in each asset. Such data was gathered from ...
The first part is easy since I can say that $E(Z_i)$ has the same distribution as $E(Z_1)$. However, how do I do this for $E(Z_{i}^2)$? I know that for sampling without replacement there is a covariance term but again am not sure how to calculate this. Any help would be greatly appreciated. Thanks!
For fitting a GARCH model, I maximize the sum of the loglikelihoods of the errors. In Excel I simply use Solver. But what algorithm/library should I use if I don't want to use Excel?
I have two matrices of equal dimensions $(m \times n)$. If it helps, one matrix is the raw data, while the other is transformed. I've plotted PC1 vs PC2 for both datasets individually, but then I realized I couldn't compare directly because the principal components likely change between the two matrices. So is there a ...
I have inherited the analysis of a study from a previous research student. I am having trouble determining what type of analysis would be most appropriate to use. I am trying to assess whether or not a significant change in measurement scores (FMD) occurred comparing before and after an intervention. ~25 participants...
I have two time series $x_t$ represents expected default rate from one data provider $y_t$ represent expected default rate from another data provider. Correlation between $y_t$ and $x_t$ is 0.9 However, the level between $x_t$ and $y_t$ is significantly different due to the data provider. One pattern of $x_t$ is th...
The mean and variance of a Poisson random variable $X$ are both $\lambda$ but what is the distribution of the $\operatorname{var} X$ across a series of experiments recalculating each time? I would like to compute an envelope for a mean-variance plot of a number of experiments and wondered if their was an analytical for...
I have built a PLS model on a training set and I have tried to predict a validation set. From the correlation between real values and predicted, the PLS model seems to have some predictive capabilities (not great but good enough for me). The Pearson's correlation coefficient is of $0.575$. Unfortunately, when I tried t...
$$f_{i}=A(D/ D_{i})$$ $$e_{j}=L(f_{i}, z^{(j)})$$ It seems to me, that above definition of k-folded cross validation algorithm (from Deep Learning book by Ian Goodfellow and Yoshua Bengio and Aaron Courville, 2016) is inconsistent with the common definition of cross - validation. In above algorithm $e$ vector is the v...
Markov models are good for analyzing sequential data. Hence they should be suitable for time series modeling. But what are some limitations of Markov models to be used for time series prediction?
Suppose I want to sample from the joint distribution $p(X, Y)$, where $X$ is a random variable and $Y = f(X)$ where $f$ is a known function of $X$. However, sampling from $p(X,Y)$ directly is hard. Could I use Gibbs sampling and sample from the conditionals $x^{(k)} \sim p(X\mid Y=y^{(k-1)})$ with $y^{(k-1)}=f(x^{(k-1)...
What is the best statistical method to use to evaluate the difference between multiple ratio-of-averages (NOT average-of-ratios)? I have two parameters (P1 and P2) that are changing over time (5 time points). I want to know if the change in the ratio of P1/P2 over time is significant. I want to compare the ratio-of-a...
I hope you can help me with this question: I have a time series data (25 years) that I will analyze to find temporal changes on seasonality over time. I am using linear regression and my model includes year (as a continuous variable) and the date in which the nest was initiated as explanatory variables. My response var...
If you have an experiment with multiple treatments (lets say 4 fixed factors with varying levels each) and you use a randomized complete block design, is it appropriate to consider the interactions between the block (random factor) and your fixed factors? I ask because I use jmp and the modeling option allows you to ad...
The data set that I have—a user's corpus of photos with time taken and an array of locations in each of them. Location is a bit hierarchical in nature, thus an array, like country, state, county, place. Between two users, I'm trying to find an image from user A which is closest(most relevant recommendation on the basis...