instruction
stringlengths
9
38.7k
My colleague took exception to this sentence in a genetics paper we are drafting together: "For each genetic locus in which we identified significantly associated variants, ..." He feels that "significantly associated" is an abuse of terminology, an (incorrect) shorthand for something like "achieving p-values below o...
I am in a bit of a pickle with some data that I have obtained in a collaboration. This is a crossover trial in which 8 elite cyclists were assigned to two experimental conditions at different timepoints. I am unsure as to how to carry out the analyses. The study can be summarized in the following points: All particip...
I have my2pl as ltm data and my3pl as tpm data. anova(my2pl,my3pl) Likelihood Ratio Table AIC BIC log.Lik LRT df p.value my2pl 16317.52 16630.39 -8078.76 my3pl 16299.71 16769.00 -8029.85 97.81 40 <0.001 Shall I use ltm or tpm model based on this anova?
Some automated sampling is done (by a computer) on a collection of $N$ identical items. The sampling process consists in keeping each item with a constant probability $\alpha$ and discarding it with a probability $1-\alpha$. Call $X$ the number of items that have been kept at the end of the process. The expected value ...
I've an AR(1) model: $y_t = a_0 +a_1y_{t-1}+\epsilon_t$. How can I demonstrate that the following form is equivalent? $y_t$ = $\dfrac{a_0}{(1-a_1)} + \mu_t$ where $\mu_t = a_1\mu_{t-1} + \epsilon_t$
I'm performing a number of single-factor parametric statistical tests (in my particular case, random-effects meta-analytic linear models, but I guess the problem would be just as relevant with for example one-way ANOVAs) with different amount of levels. For some of these tests, I have highly unbalanced designs, where o...
I was reading about learning rate change in a machine learning course. The following statement and image appear: Turning down the learning rate reduces the random fluctuations in the error due to the different gradients on different mini-batches. So why if we reduce the learning rate, the error is quickly reduced afte...
I was reviewing the answer to the question about the "Gradient of Hinge Loss" here: and noticed that one of the answers proposed returning of averaged weights in function: def grad_descent(): ... return np.sum(ws,1)/np.size(ws,1) I m curious if there is any special reason for averaging weights? Why not to find best w...
Should I detrend data when doing a hypothesis test? It's daily sales data. One group with days of rain, one with days without. Taken from a group of about 100 days from the same time period ie Feb 2-may 5. I'm very new to this. Any help is greatly appreciated.
I'm a software engineer working on Deep Learning, but mostly for NLP. I have a Raspberry Pi 3 and some cameras and wanted to play around a bit with target tracking (implementing models from scratch in TensorFlow, not using OpenCV or similar), i.e. actually understand the techniques. What are currently the most importan...
I'm trying to derive the MLEs and likelihood ratio rest statistic for the following hypothesis test: that the two means are equal against a two sided alternative. I need the MLE for u, σ1^2 and σ2^2. I'm struggling to find the MLE for two normal distributions with unequal variances. Let X1 . . . Xm be a random sample f...
Question: What is an appropriate extension of Tukey's method to proportions? Normal situation In one-way ANOVA problems $$ y_{ij} = \mu_i + \epsilon_{ij}, \quad i=1,\ldots,m $$ Tukey's studentized range statistic is often applied to pairwise differences $\mu_l - \mu_k$ is applied to correct for the multiple testing of ...
Can a decrease in mean absolute percentage error (MAPE) be correlated with an increase in standard deviation of the error? Is that counter-intuitive? What about MAPE vs. mean absolute error (MAE)? I'm wondering if those metrics should follow a trend, or not necessarily. Update The general concern is as follows: when pe...
I have implemented the tree building part of CART, but I'm wondering if it can be optimized. According to this quora answer, the complexity should be $\mathcal O(v \cdot n \log n)$ where $v$ is the number of features and $n$ the number of records. Now my implementation looks as follows (in python, with some implementat...
I was hoping you could help me interpret the following cross-correlation plot of U.S. and China short-term interest rate time series(1997-2015). I am a beginner to statistics, so I apologize if I am making simple mistakes. Would it be correct to say that since a lag of 4-5 months will yield a correlation of just shy of...
In a course on Machine Learning, in the chapter about a Perceptron, there is this statement: If a generously feasible region exists, then the distance between the current weight vector and a weight vector in the generously feasible region will monotonically decrease as the learning proceeds. Why is this the case?
I am seeing this plot (side 5) here a lot in machine learning literature. But how to read it? In general I know $\lambda$ is increasing from left to right, and we are getting larger coefficients. But What are the x and y axis? and two scales of each axis?
I have a dataset related to work-safety that covers over 100,000 worksites over a course of 15 years. I would like to experiment with machine learning models to predict the number of injuries that will occur the next year. The objective is to create a tool that takes as input an identifier for the site and returns a pr...
I'm arguing with a friend and he doesn't have a solid argument for his statement. I claim that if a random variable is asymptotically unbiased then it is consistent, and that implies convergence in probability: Example: Suppose i have a estimator $\hat{\theta}$ for a parameter $\theta$. Suppose that $E(\hat{\theta}) = ...
My research suggests that when an LMER/GLMER fails to converge due to a too-large deviance gradient... e.g., Model failed to converge with max|grad| = 0.00297196 (tol = 0.001, component 1) You should be worried. Everything possible should be done to examine the data for problems and question your assumptions (i.e., ...
In a given (including convolutional) network, suppose I have a pair of consecutive layers, the first with $x$ units, and the second with $y$ units, where $x\gt y$. Will it be a problem if $(x-y)$ is large? For example, say, if $x\approx1000$, and $y\approx5$. To me, it intuitively seems so because it feels like a large...
This is the situation: I observed 12 classes (4 elementary, 4 intermediate and 4 advanced) without any intervention or treatment. Each class was taught by a different teacher. Then I counted the number of uses of irony used by each teacher in each class. I came up with these numbers: Elementary level Intermediate le...
I am currently writing on my master thesis, therefore i have to find out if a specific moment had an impact on a time series. By just looking at the plot I would say that after the prize reached his maximum at observation 831, there was a shift in the trend... in other words i would say there is a structual break. I w...
Both this post and original paper, suggest R glmnet does not regularize the intercept. But why I am observing the intercept shrink to $0$ in following experiment? library(glmnet) n=1e4 p=1e2 x=matrix(runif(n*p),nrow=n)-100 y=sample(0:1,n,replace = T) fit=glmnet(x,y, alpha=0, family="binomial") plot(fit$lambda,fit$a0) ...
I have an odd question concerning the way one could assess that a value collected on a single individual differs from values collected on a group of people N (clinical research). This is a lot like assessing that an individual is considered as an outlier I guess. I was just thinking of two ways of doing it: firstly on...
How should accuracy for a multiclass problem be calculated? a) Overall accuracy: All_True_Positives/All_classes b) Average of all the accuracies from each class. (Sum each accuracy and divide by the number of classes). Thank you
I'm reading through Leeb and Pötscher's Model Selection and inference: facts and fiction (2005) (Link) On page 28 they perform a calculation, but I'm not sure how they derived the result. The state: Furthermore, we can also calculate, for given $\beta \not = 0$, how many data points are needed such that the probabil...
I hope I can phrase my question intelligibly three groups of sample for a total of 192 individuals - group 1: 40 individuals; group 2: 82 individuals; group 3: 70 individuals. the 95% CI range of disease-free period after treatment - group 1: 9-14.7 months (median: 12.8); group 2: 5.3-7.6 months (median: 5.7); group 3...
As a result of some previous experiments at 5 different temperatures, I have 5 simple linear regression slopes describing the effect of body mass (independent variable) on water loss rates (dependent variable) of frogs. For a new set of experiments at that the same 5 temperatures, I used the predicted values from slope...
I am little confused regarding finding expectation of vector multiplied matrix. X is vector having mean $m_x \in \mathbb{R}^{N\times 1}$ and variance vector $s_x \in \mathbb{R}^{N\times N}$. $\phi$ is a vector with mean $\mu_\phi \in \mathbb{R}^{N\times 1}$ and $\Sigma_\phi \in \mathbb{R}^{N\times N}$. Now I want to fi...
Let us consider first case. I have logistic regression with one categorical variables with 3 distinct values. I can code as Value A -> (0,0) Value B -> (1,0) Value C -> (0,1) And with intercept my variables would look like Value A -> (1,0,0) Value B -> (1,1,0) Value C -> (1,0,1) Now once I have regression done, it i...
I am trying to get an intuitive idea of RBMs out of curiosity, and using a simple example on youtube based on preferences for different sports, which denote profiles roughly corresponding to outdoor and indoor predilections. The idea is to target ads. Here is the model: The examples in the sample are: Example Football...
I am trying to build an LSTM neural network to do sentiment analysis on twitter feeds. The dataset I use contains ~1.5M twitter feeds with either positive or negative sentiment (the tweets were ranked by the emojis they use). Additionally the tweets are made uppercase to simplify learning. The reason I use LSTM is that...
I need to do a statistical test for one of my study but I’m not sure which test is appropriate. This is my experiment: I measured performance of 30 tools (F1 scores) on classifying a pair of documents as similar or not. Then, I applied an enhancement process to every tool and measured the tools performance again (they...
I am looking for any papers or suggestions of how one may perform training and inference for cloze tasks (fill in the blanks) with multiple blanks in the sentence. In the case of just 1 blank, using an LSTM from both directions would be a good idea, but what about cases with multiple blanks? After a brief pursuit, the ...
I am comparing the consumption of algae given a treatment (5 levels) each at a unique site (N = 20). I deployed the same amount of algae at each site and assessed algal consumption by recording the amount of algae remaining at the end of the trial. Thus, the response is censored at the minimum consumption (0) and the m...
I'm working at a project that would like to do topic extraction / classification from data, consisting of various NL sources (tweets, social network updates, pastebin). Data are very diverse in content and lenght, and extremely noisy. The aim is to predict: a) pertinence to a given set of categories b) distinguish betw...
Let $y:=\frac1n\sum_{i=1}^n x_i$, where $\{x_i\}_{i=1}^n$ is a set of i.i.d. random variables, and every $x_i$ has a lognormal distribution $x_i \sim\text{Lognormal}(\mu,\sigma^2)$. Let $\text{Med}[y]$ be the median of $y$. Is the following inequality true $\forall (n,\mu,\sigma)$? $$\text{Med}[y]<\mathbf E[y]$$
If we have the linear model $Y_i-\bar{Y} =b(X_i - \bar{X}) + \varepsilon_i,\ i=1,..., n$ , then we can find easily an unbiased estimator $b^*$ for $b$ with the least squares method. If $c=(Y_n - \bar{Y})/(X_n - \bar{X})$ is another unbiased estimator, then which one is better to choose? I believe that the least square...
What are the minimum details that i need to know in order to find the limit in probability of a specific random variable (such as the sum of several random variables)? For example, suppose i have a sequence of random variables: $X_{1}, X_{2},...,X_{n}$ and i know that: $E(X_{i}) = \mu$ and $Var(X_{i}) = \sigma$ but i d...
Point Forecast Lo 80 Hi 80 Lo 95 Hi 95 2017 Q1 230627.8 227619.2 233636.3 226026.6 235228.9 2017 Q2 230552.6 226719.9 234385.3 224691.0 236414.3 2017 Q3 236782.3 232580.2 240984.3 230355.8 243208.7 2017 Q4 242080.8 237454.1 246707.5 235004.8 249156.7 2018 Q1 243504.0 23...
Assume I have a program that executes the following pseudocode x = 1 for 0 to n y = random real in [0,1) if y < x x = y return x What is the expected value of the return of this function wrt to n? In english, set X to 1000. Choose a random real in the half-open interval [0,1) n times, setting the mini...
Question: Is there a rule of thumb for setting a non-diagonal covariance matrix for your Metropolis-Hastings proposal distribution? References are appreciated. Background: Say I have some posterior distribution I am interested in obtaining samples from $p(\theta|y)$. I choose an initial proposal distribution for a Metr...
If the VC dimension of a fixed hypothesis class is $d$, then showing the gap between the sample and generalization error for any hypothesis in the usual agnostic computational learning problem is $O(\sqrt{d/m}\log^{1/2}\frac{d}{m})$ with high probability is a common problem addressed by elementary statistical learning ...
VC complexity bounds are generally well-known for common hypothesis classes based on supervised learning ERM algorithms. However, VC bounds are independent of the distribution from which the data is assumed to be generated in an iid manner. This weak assumption suffices to prove that the gap between training and genera...
I read that this is because the mean and variance completely specify a normal distribution. However, e.g. for a Poisson distribution the mean, variance and third moment can all be expressed with the same parameter lambda. Is this not what it means to 'completely specify' a distribution? What is an example of two Poisso...
I am doing a regression that involves many countries. One independent variable is revenues of sampled companies in each country. But the data I have use the reference countries' currencies (so I have multiple currencies). The model requires me to scale the independent variables such as revenues using lagged assets (e....
I am assessing the economic impact of High-Speed Rail (HSR) between two cities using Difference-in-Differences. To do so I have a set of treated and control regions (indexed by i). I am assuming that treatment starts at the year t=2007, and I have data from 2000 all the way to the year 2016. My query is as follows: I a...
This is my first endeavor into linear mixed models, and I haven't found an example that uses a fully repeated measures design, so I was hoping that I could get some help. I have a dataset that looks like this: Mydata <- data.frame( Subject = c(1,2,3,4,5), Condition =c(rep(c("High", "Low"), each=50)), Size =c(rep(c(8, ...
I have a dependent variable dv and an independent variable iv in a timeseries dataset. The iv varies independently from time. Instead, the dv varies not only in a cumulative way but is also equal to zero for a long period. I want to estimate the association between the two variables (and other control variables). I wo...
In ARMA model, the error term is assumed to be white noise, i.e. independent and identically distributed. In ARCH model, we relaxed the assumption and let the error term to be uncorrelated but dependent. Then, we specify a structure for the error term. Is my understanding correct? Thanks.
I have been working through John Kruschke's excellent book on Bayesian Data Analysis but now have found myself in experimental-design territory not covered in the book: a longitudinal linear mixed-effects model. I would like to test the difference in linear trend over time between two groups. There is a two-level betwe...
There were many similar questions on this site , related to this but none were exactly to the point I wanted to ask So the question is relates to ridge regression and This link where there is a statement(in bold) that In a least squares fit where coefficient estimate given by has no unique solution when is not invert...
I want to perform two sample test on large dataset (in my case, each sample size is around one billion, and each data point is single real number). Which statistical test should I choose? The null hypothesis is that two samples are from the same distribution, and alternative is that two samples are from different dist...
I realize I can't invert the $X'X$ matrix but I can use gradient descent on the quadratic loss function and get a solution. I can then use those estimates to calculate standard errors and residuals. Am I going to encounter any problems doing this?
Setup: I have data that seems to follow a lognormal distribution. By logging every data point, I can also generate a corresponding normal distribution. I wrote a python script to use maximum likelihood estimation to find the optimized parameters mu and sigma. This script is also used to generate a contour plot of an er...
Suppose I have a high dimensional non-stationary non-linear time series, then is it advisable to center the data on the mean when performing laplacian eigenmap? I've heard somewhere that when performing machine learning, the performance and accuracy increases if the data is centered on the mean. If it makes any diffe...
I am trying to run a simulation in logistic regression but got trapped. Why I am only get ~71% accuracy even using ground truth of coefficients for prediction? set.seed(0) n <- 1e5 p <- 5 X <- matrix(rnorm(n*p), ncol=p) beta <- runif(p) y <- rbinom(n,1,prob = plogis(X %*% beta)) Note we can get the estimation of beta ...
I am trying to interpret, for model 2, the betas for Success (Dummy 1/0). What is the probability females have success in technical fields and how do I calculate it with the betas. m5 <- glm(success ~ female + technical + female*technical, data = subset(dt.data, company==0), family = binomial(link = "logit")) m6 <- g...
I checked my PCA code many times, and I can't find anything wrong. I do PCA with eigen-decomposition, by using the eigen function in R. My data is 2-dimensional, I want to reduce it to one dimension. I center my data. I don't understand why the distances in the image I send don't match relatively. I even compared my so...
Suppose $X$ is a random variable and two hypothesis defined as: $$H_0:f(x;\lambda_{0}) = ‎\lambda_0 \exp(−\lambda_0 x)$$ $$H_1:f(x;\lambda_{1}) $$ $$x \geq 0 \quad \text{and} \quad \lambda_1>\lambda_0$$ My question is that how we can make a Neyman-Pearson test for that?
I am experimenting with stochastic gradient descent and observing very strange output. In a toy problem, the $X\beta$ for stochastic gradient descent is always larger than $0$, which will be predicting $1$ all the time. But the shape is similar to glm. What could be wrong? My code: library(sgd) set.seed(0) d=ggplot2...
I'm using library(ROCR) and I have a dataset with 4 class and I would like to plot a ROC curve for a multiclass classification. I plotted the graph of each class x every other, turning into binary, but I wanted to plot only one graph, demonstrating the behavior of my variable. I do not know if what I did is correct. x ...
I have two models with AIC values 2500 and 2590. So.... Is that significant? What percentage decrease is usually considered significant?
I am trying to do a correlation based feature selection for a classification model. Dataset details is given below. Training :- 38 Samples, 7130 features. represented as T Testing :- 34 Samples, 7130 features. represented as S Target: 2 classes (Yes | No ) So, I need to select first 100 features highly correlated with...
Supposing that $A \sim \mathcal{N} ({\mathbf 0}, K_1), B \mid A \sim \mathcal{N} (A, K_2)$, then what is $B$? I'm guessing that $B$ is also normal and there is a formula but I can't quite find it. A proof of the formula as well would also help.
I would really appreciate some help as I don't have a strong background on statistics. I have duration time without failure data of compressors (Machines) for 3 brands, and I have for each of them: - material type (categorical) - location (categorical) - capacity (numerical). I have data of 125 compressors of brand A,...
Consider the following: I have samples from two groups, and I want to answer the question are the BMIs for the two samples (say men and women) drawn from the same distribution? I do not want to compare the raw data, because I would like to control for any systematic differences (e.g., in ethnicity, health, SES, etc.) t...
I have built a logistic regression in python. The Betas are calculated through the gradient descent (ascent actually) method. The change in loglikelihood between iterations is used as a measure to see how close the betas are to their 'true' values. At what point can it be said that the model has converged? I.e. how sma...
Recently, while dealing a data set which have very different scales among variables, I tried obtaining a PCA model from covariance and correlation. I know that when the scales are significantly different PCA from correlation matrix is more suitable. My problem is, in correlation case, the first 2 PCs accounted for 70% ...
I am conducting a reliability generalization for Perceived Stress Scale. This instrument has 3 version: PSS 4, PSS 10, and PSS 14. Descriptive statistics showed PSS 4 (alpha = .74, 95% CI = .70-.76) have lower alpha coefficient than PSS 10 and PSS 14 (both have identical alpha value; (alpha = .84, 95% CI = .83-.85). I...
I have a problem. Our professor is giving us at the exam the opportunity to choose to answer only one topic among eight on the exam. The total number of topics in the subject is twenty-two. I would like to know what is the minimum number of topics to study in order to get at least 90% probability to know at least one ...
F-test tests the null hypothesis that all coefficient of variables in the model equal to zero. P-value in a hypothesis test shows the probability of having observed results if null hypothesis is true. My question is that if the model only has one variable, just like m2 and m3 shown as following, is the result of f-st...
Keeping in mind regression model equations of the following general type $$Y = β_0 + β_1X_1 + β_2X_2 + ε$$ I notice that although $ε$ is usually given as the error term, sometimes the error term is denoted as $u$ instead. My question is: is there some difference between the contexts in which $ε$ is used and $u$ is use...
My company wants to build a model that will be used to predictive conversion that is usually about 2%. However every sample we purchase (converted or unconverted) is expensive. So my question is: How many converted samples do i need, 500 or 1000 ok? How many unconverted to I need? The same number? I can't have as many...
I would like to know if there is any way (perhaps a bootstrap approach) to backtransform the estimates of a linear mixed effects model with a transformed response variable (and transformed predictor variable). Let’s say those are my data: x = exp(rnorm(100, 5)) y = log(x)^2 + rnorm(100, 3) random = c(rep("A", 50), rep...
I have dataset of 250000 points which has 15 features. Each feature takes values from 0 to 100. So, I want to fit a probability distribution to this dataset to identify outliers like wrong data entry. For univariate, I could follow this approach. How to do this for multi variate? How to measure the goodness of fit? Ans...
I have a dataset with many subjects, and for each subject I have 100 samples for an X variable, while Y has exactly 50%/50% cases for label 1/2. I am trying to run cross-validation with SVM and found that accuracies are always below 50% despite the set being balanced. So I made up the following simulation and changed t...
Let $$Y_1\sim \operatorname{Poisson}(\lambda_1)\\Y_2\sim \operatorname{Poisson}(\lambda_2),$$ where $Y_1$ and $Y_2$ are independent, and $\lambda_1, \lambda_2>0$. What is the variance of $$\frac{Y_1} {Y_1+Y_2}?$$ Or more general, what is the variance of $$\frac{X_1} {X_1+ \cdots +X_n},$$where $X_i\sim \operatorname{Poi...
I have a paper that just got rejected. It appears that my identification strategy is not sound enough. Below I describe the critique and seek some advice. My sample is elderly aged 55 and over. The dependent is a health outcome. Two independent variables of interest are part-time (working less than 35 hours a week) and...
A bag contains $N$ balls numbered $1,2,3,…,N$ to test the hypothesis $H_0 : N=10 $ vs $H_1:N=20.$ Draw $2$ balls from the bag without replacement, let $X$ denote the larger of the $2$ numbers in the drawn balls and reject $H_0$ if $X>9$. What is the power of this test? My attempt. When $H_1$ is true, $N=20$. And now we...
According to the theory ARX(1) is the same as a linear regression with a lagged y. For some reason the coefficients can be very different though. Here is a simple dataset for demonstration purposes: y=c(3,4,6,3,3,5,7,8,5,7,3,2,5,7,4,3,5,6,8,4,3,5,6,3,2,5,6,7,8) y.lag1=c(3,3,4,6,3,3,5,7,8,5,7,3,2,5,7,4,3,5,6,8,4,3,5,6,3...
Data: transaction - product_bought,amount,time,date,Client_age,Client_occupation etc product- 20 types (categorical) If we want to predict by analyzing 1 year of transactions, what product user will buy next and when : To predict : Product , time ( in days after last transaction) Example: | Product | When ...
Let's say that I have an input X = Q + W + Z and an output Y. Is it better to find a unique predictor using (X,Y) or to find 3 predictors using (Q,Y), (W,Y), (Z,Y) and then do the mean of the prediction for these 3 predictors ? I am looking for some theorical reasons to explane if the 2 procedures are equivalent or if...
I just finished a course in regression on count based outcomes. We studied various distributions such as the Poisson and Negative Binomial. Towards the end of the course, we discussed Zero-Inflated Poisson and Zero-Inflated Negative Binomial. Now I am hoping to learn a bit more about these during the summer. During the...
I am currently working a lot with R and Python. I am not able to access the C code the the R function lm_fit. I am wondering how is the linear regression optimize in R and python ? I am pretty sure in R it is optimize with the Normal equation (since R is good with matrix multiplication) and I would think it is optimize...
I am trying to replicate the following graph that I found in a paper: After emailing the author, he described the process to generate this graph by saying: "...we did simulations with these different SD values superimposed on the slopes and then computed power" I've tried to replicate it but I'm having trouble ge...
I fitted model 1 and model 2. I then plotted the residual plots. Model 1 had some minor problems with the residual plot: there was more variance in the residuals on the right side than on the left. This suggests that variance is not constant. Model 2 was fitted where the variance could depend on a predictor $x$. The re...
Without being geostatistician, I read a bit about anisotropy detection, mostly from ArcGIS documentation and the R gstat package tutorial. But still, it is hard to have a confident understanding of those concepts and even in general, when should we account for anisotropy? I am therefore looking for more experienced opi...
I'm currently struggling with some statistical work, and thus I'm seeking your advice. I'm trying to investigate the expected duration of a conflict in a) a democracy and b) an autocracy. What I do know: the probability of onset of a conflict is: in democracies: 1% in autocracies: 2.6% the probability of continuati...
In powder metallurgy people often use particle distributions such as this one: I understand this distribution as a probability density function. I integrated this function to obtain the cumulative distribution function: The value of the CDF is supposed to be one for particle sizes over 50µm but this is not the case. ...
I do data cleaning / data preprocessing everyday, using various tools to remove outliers and to keep normality However, I feel what I am doing is more a handcraft rather than systematic: I don't have a procedure to guild me what should I do or more importantly: why should I do this? I am now looking for a more 'system...
I am doing a projects using glmnet package and have hard time to interpret the result. The scenario as follows. There are 7 variables x1, ..., x7. x3, ... , x7 are scaled to mean 0 and std 1. I fit a Lasso regression on x3, ... , x7. Lasso selects some variables. Then I fit a Lasso regression on all variables, i.e.,...
In the OpenIntro text book, there is the following example: Globally, the average sleep for a high school student is 7 hours. The researchers at the rural school conducted a simple random sample of n = 110 students on campus. They found that these students averaged 7.42 hours of sleep and the standard deviation of the ...
I was asked the following question during a job interview: A coin is flipped 1000 times and 560 times heads show up. Do you think the coin is biased? What would be your answer? (I find the question "Quantifying 'survey bias' in reports" related (but it is not answered).)
Most examples of logistic regression uses a cutoff (for classification) of 0.5. But I suspect this is a reasonable starting point only if you have equal number of positive samples and negative samples. Suppose we want to classify whether someone will get a disease or has a disease. We randomly draw 1000 people from the...
From PRML: Do variations in $a_j$ give rise to variations in $E$ only via $a_k$? True. Is $h'(a_j)$ the same across all $k$? I'm afraid not. Let's write down what $\partial a_k/\partial a_j$ are. Since $a_k$ are in the layer that succeeds $a_j$: $$a_k = h(\sum_{j'} w_{j'\to k}a_{j'})$$ in which $j'$ runs through all...
I have two distributions I would like to compare. For each distribution I have only x values at some given percentiles (5, 25, 50, 75, 95). I would like to make some inference on how different these distributions are. I have some idea on how I would like to do it, but may be in a bit over my head technically. My t...
My aim is to test the independence of two categorical variables, however the independence assumption of the chi-square test is violated and both the Cochran Q and McNemar tests are not suited to my experimental design. I am looking for an alternative test that might suit my data. The data is as follows: variable 1: con...
My data have four groups: "A" normal group (AN), "B" normal group (BN), "A" group with a clinical diagnosis (AC) and "B" group with a clinical diagnosis (BC). They were tested on a task that included 2 different conditions. I plan to analyze the groups' error rates and reaction times separately. The data are non-nor...