instruction
stringlengths
9
38.7k
I have a situation where I want to test for differences between rows and columns in my data frame: ID Cond1A Cond1B Cond2A Cond2B Sample1 2000 2311 2323 2324 Sample2 2424 1313 2324 4546 Sample3 1213 3413 2342 3353 How do I test if Sample1 i...
I'm reading Schaum's outline of probability, random var. and random processes. In the second chapter they make it clear that a random variable $X$ is not a variable in the traditional sense but rather a function $X(\zeta)$ where $\zeta$ is a sample point in sample space $S$. So $S$ is the domain of r.v. $X$ and collect...
I've been reading about kernel methods, where you map original $N$ data points to a feature spaces, compute the kernel or gram matrix and plug that matrix into a standard, linear algorithm. This all sounds good when the feature space is infinite dimensional or otherwise very high-dimensional (much much larger than $N$)...
Nowaday, there are lots of online courses related to machine learning, and there are lots of programming languages which can be used to do data mining, such as R, Python or Matlab. For example there are lots of data science related courses on coursera, some use R and some use Matlab. Lots of the time I just download ...
I'm using R and the package boot. my boot function returns the coefficients and the r.square and sqrt of the r.square rsq2 <- function(formula, data, indices) { d <- data[indices,] # allows boot to select sample fit <- lm(formula, data=d) return(c( coef(fit),summary(fit)$r.square,sqrt(summary(fit)$r.s...
I'm using count data in quite a simple way, but I cannot understand how a binomial glm can return negative predictions example code, where count of successes increases with responce variable: suc=c(1:10) fail=c(10:1) predict(glm(cbind(suc,fail)~c(1:10),family=binomial)) which results in: -1.9974174 -...
I am getting started with R. I imported by data and R decided that my ID attribute should be a factor. While technically correct, it feels misleading to me. An ID doesn't feel like a factor with 18,327 levels- one level for every observations in the data set. Should ID be of type factor or should they be coerced into t...
Can we predict through multiple regression if the dependent value is always 1 and there are some quantitative and qualitative independent variables?
Assume that I have a discrete set $L$ and a transformation $\phi: L \rightarrow [0,1]$ that normalizes set $L$ such that now values belonging $L$ are uniformly distributed among the unit interval. How do I mathematically state that $\phi(L)$ adheres to uniform distribution?
Suppose a theory claims that a random variable $R$ (of unknown distribution $F$) must satisfy a certian upper bound $R < c$ (where $c$ is known constant). Suppose I perform a set of measurements $X_1,...,X_n$ which are iid~$F$, but because of errors, I observe $X_1+E_1,...,X_n+E_n$ where $E_1,...,E_n$ are independent G...
How can I define correlation between two set x and y: {$(x_1,y_1),(x_2,y_2),(x_3,y_3),...(x_n,y_n)$} Is this definition correct: Correlation=$\frac{\sum\limits_{i=1}^{n}(Covarianc(x_i,y_i))}{\sqrt{\sum\limits_{i=1}^{n}(Variance(x_i)Variance(y_i))}}$
I'm trying to understand how uncertain an estimation of a demand distribution of a good is. If I take a random sample of n people from the representative consumer population who give me their personal cutoff/choke prices (assuming they accurately report them), I can construct a demand curve with n points representing a...
I have trained my random forest model on a 74,000 training examples where each example consists of two proteins Amino Acids sequence (20 characters) and some numeric values representing the similarity between each individual pair of sequences, and finally a numeric value representing the overall similarity between the ...
I am trying to fit a multinomial logit model on the data below. I want to see whether gender, age, population and the province have an influence on the reporting behavior of a victim of crime. This is my model: library("mlogit") #source("~/Forge/mlogit/chargement.R") R <- mlogit.data(data, shape="wide", choice = "choi...
I have a classification task where $n\gg p$ (like 440000 vs. 23). I want to use Lasso (glmnet in R) to select the variables first, then use techniques like random forest or boosting for the actual classification. I read this from Statistics for High-Dimensional Data: Methods, Theory and Applications: I am not sure whe...
I am trying to plot the ROC curve for a random forest model (ROCR package), and I am getting weird results. I have double-checked the code several times, but I can't figure out why the functions give out an AUC of 1 and a perfect ROC curve. If I do the same with the data included in the package (ROCR.simple), everythin...
Using the paramater names from What is lambda in an elastic net model (penalized regression)? I wonder about best practices or suggestions for how to determine $\alpha$, i.e. the paramater determining the weighting of the Lasso and the Ridge. My guess is that one does a 1 dimensional grid search (is there another term ...
in a plot of my time series there is clearly visible that there is structural break, but I have to find the exact date. I want test this with the chow test. Although I understand how to perform this test if the date of the structural break is know, by simply using a linear regression with two dummy's one for the interc...
I'm looking for advice to whether or not the following method is good and is standard for calculating PCA of the data. So the examples that I will give will be small. Given a matrix of $A = [4, 6, 10; 3, 10, 13; -2, -6, -8]$ and Compute the Covariance matrix given as: $$A = \begin{bmatrix} 10.3& 24.6 & 35.0\\ 24.6&...
I am trying to recognize a spatio-temporal pattern in my spatio-temporal input sequence X. The occurrence of the pattern is roughly temporally correlated with another event E1. For example I have training data of this kind: ...0010010000100001001001000010000001000000010010000... x1 \ ...00010010001000000000010000000000...
Each sample in my data set is an $N$-bit bit-vector (say $N$=200). The bits in each sample are not uncorreleated within the sample. I built a matrix $S_{N \times N}$ with each $s_{ij}$ being the proportion of samples where the $i$-th bit and the $j$-th bit were identical. This is a symmetric similarity matrix (obviou...
I have data from a set of sensors, and would like to measure similarity between two samples of data ignoring local fluctuations. My problem is, my sensors are not regularly placed : some are quite alone, others are many in the same area, there is no regular pattern in their locations. I want to measure similarity in te...
I am using randomForest and obtain a model: Shoppers.rf <- randomForest(repeater ~ . - id, data=trainData, importance=TRUE, ntree=1000, mtry=15, nodesize=50, maxnodes = 100) varImpPlot(Shoppers.rf, type=2) The diagram tells me that the 'brand_penetration' variable is the most interesting to predict ...
I have a 2x2 between-subject design with unequal cell sizes. I ran an ANOVA with type I sums of squares to account for the unequal cell sizes. Neither of the two main effects nor the interaction effects were significant (all ps > 0.1). With an overall of 2x2 = 4 cells/groups there are obviously 6 possible pairwise co...
As part of a course on missing observations in social/survey statistics I am trying to explore existing methods of predicting either point pattern or polygon data. I got quite confused by all the different terms and formalisations used in geostatistics (more on the kriging side) on the one hand and spatial statistics/e...
In this experiment we collect $N$ samples and each sample yields a pair of survival curves. The two survival curves are hypothesized to be identical up until time $t$ and diverge thereafter. What would be an appropriate method by which such a point $t$ can be estimated and statistically validated?
As a (perhaps contrived) example, let's say we want to discover from some empirical data Coulomb's law for an electric field: $$F = \frac{1}{4 \pi \epsilon_0} \cdot \frac{|q|}{r^2}$$ In this case we would have a matrix whose columns include force $F$, charge $q$, and radius $r$; as well as perhaps some columns containi...
Let's say I have two people, A and B, who are each performing a different task. They have an aptitude score which designates how well they perform any task; A has apitude score a and B has aptitude score b. A succeeds on her task while the majority of people with an aptitude score equal or higher fail. B fails his task...
Hi I have two questions related to a previous question I asked here: Simplex Random Walk In this link it describes how to perform a random walk on the simplex. http://en.wikipedia.org/wiki/User:Skinnerd/Simplex_Point_Picking It says that "This procedure effectively samples $x_{new}$ from a gamma random variable with me...
Is there a concern using a 4-point likert-type scale (i.e., agreement) when attempting a cluster analysis using k-means clustering? Most of the data for the items in my data set are favorable (e.g., Strongly Agree and/or Agree). Would I get better results with a 5-point scale?
Let's say I have a dataset with scores on a bunch of questionnaire items, which are theoretically comprised of a smaller number of scales, like in psychology research. I know a common approach here is to check the reliability of the scales using Cronbach's alpha or something similar, then aggregate the items in the sca...
##Data loading data(economics) load(economics) ##Data splitting Index <- createDataPartition(economics$unemploy, p = 0.8,list = FALSE, times = 1) head(Index) train <- economics[Index, ] test <- economics[-Index,] ## SVM - Regression svmRbftune <- train(unemploy ~ pce + pop + psavert + uempmed, da...
I want to choose the best random structure for my mixed-effects model. I have compared four models: without a random part, random intercept, random intercept and slope, and random effects: gls0<-gls(time.dep~exper*group*fat*FL, method="REML",data=test) lme1<-lme(time.dep~exper*group*fat*FL, random=~1|ring,data=test,met...
I'm looking to generate fake data to fit a multinomial logit in R? Any code/suggestions on material to look at would be very much appreciated ...
I'm not even sure that the question makes much sense, but I think I saw a couple of titles of papers where they proposed random forest with random effects. Is this possible in R?
I have a study where many outcomes are represented like percentages and I'm using multiple linear regressions to asses the effect of some categorical variables on these outcomes. I was wondering, since a linear regression assume that the outcome is a continuous distribution, are there methodological problems in applyin...
In R, usually one performs a generalized additive model like so: library(mgcv) x <- gam(depvar ~ s(indvar1) + s(indvar2) + parametricvar) Say I want to explore the non-parametric interaction of indvar1 and indvar2. Is the following kosher? Are there issues of statistical validity with implementing such a model? x <- g...
I am fitting a few time series using fitdistr in R. To see how different distributions fit the data, I compare the log likelihood from the fitdistr function. Also, I am fitting both the original data, and the standardized data (ie. (x-mean)/sd). What I am confused about is that, the original and standardized data gener...
As per my job requirement I have to do forecasting using only Holt Winter technique in R.I have weekly data for 2 and half years & I have to predict weekly.I'm planning to build time series with frequency 52. I'm seeing that HoltWinters() function in R can do only Additive trend-Additive Seasonal (A,A) & Additive trend...
Given a data matrix $\mathbf X$ of $12 \times 7$ size with samples in rows and variables in columns, I have calculated centered data $\mathbf X_c$ by subtracting column means, and then computed covariance matrix as $\frac{1}{N-1} \mathbf X_c^\top \mathbf X_c$. The dimensions of this covariance matrix are $7 \times 7$. ...
Below is the output from a model of novel object test scores fit with the nbinom1 (quasi-Poisson) option in glmmADMB. I used this package/method because: the Poisson mean is < 5, so according to Bolker et al. 2009 I should not use glmmPQL there was overdipersion with the Poisson model run with glmer. The NB1 model fi...
I have a list of 20 QTL from an experiment involving a certain phenotype related to bone development. Of all the candidate genes within the 20 QTL intervals, 5 are associated with a certain disease in humans. I tested the set of 20 QTL to see if they are enriched for the disease-associating genes. Each of the 20 QT...
I wish to do topic modeling on text corpus some of which are about company earnings which has lots of numbers in it. It has no sentence structure. I think tagging numbers using nltk.pos_tagging can help me find out if the number is CD (numeral/cardinal). Using numeral feature as one of the many features in the BOW can ...
I have a data set of 1,100 observations, I have two continuous variables (counts of different things) that were positively skewed, so I first log transformed each of them. Now I need to make a composite variable, per literature, that measures a construct. My question, per observation/row, should I now add each of the l...
Let's assume that one has the following inputs and corresponding outputs: x1 = (a,b,c) with corresponding output y1, which is a number. x2 = (d,e,?) with unknown output x3 = (?,?,g) with known output y2, which is a number and so on. So, by "incomplete input data" I don't just mean that some input data is unlabeled but...
Would it make sense to apply a measure of association test like Cramér's V on a 1xk table? I am a bit puzzled because in the literature phi and Cramér V are normally used on 2x2 or bigger contingency tables, but while I was looking for some more info, I found the following statement on Wikipedia: "Cramér's V may also ...
I asked a variation of this question, but I want to be more direct. Take the exact same Triple Exponential Smoothing Model (Holt-Winters with a moving level, trend, and seasonal component)--- Would or would not --- the smoothing parameters alpha, beta, and gamma (determining the weight of recent data on level, trend, a...
I have a data set with two columns, the first of which is to be used as a response variable and the second of which is to be used as a predictor variable. The predictor variable, however, is populated by integer values, many of which are zero. When I place data points for the predictor and response variables into grou...
I know this is a touchy subject, so I'll proceed with caution... I am building regression models for some hundreds of thousands of data files containing only two columns. The sensor collecting these data is not great and sometimes things interfere with the measurement, so the data are extremely noisy; a typical file m...
What is the typical method for creating a probabilistic output from an All-vs-All or One-vs-All multi-class classifier? For example, if my problem has 3 classes (Class1, Class2, Class3) and I build an AVA classifier, then I have a classifier for: Class1 vs Class2 ($f_{12}(x)$) Class1 vs Class3 ($f_{13}(x)$) Class2 vs ...
Im a surgeon who's trying to compare two diagnostic tests that are used to diagnose appendicitis. Two diagnostic tests were applied on 150 patients and the results were compared to a gold standard. I understand that the sensitivities and specificities can be compared by using a McNemars chi square test. But what about...
I have a question regarding the QQ plot and KS test. I have a sample which is some positions on genome, and I calculated the distance between these positions. And I generated the null distribution by randomly draw positions from genome and calculated the distance between them in the same way. (1000 times) I want to t...
How can the matrix of (ultrametric) distances be extracted from the result of hclust (or a dendrogram in general) in R? The distance of two units in a dendrogram is defined as the smallest distance at which the two units (or the clusters which they are part of) merge. For example, in the attached dendrogram, the (ultra...
I have written some code that can do Kalman filtering (using a number of different Kalman-type filters [Information Filter et al.]) for Linear Gaussian State Space Analysis for an n-dimensional state vector. Let us consider the linear Gaussian State Space model $$y_t = \mathbf{Z}_{t}\alpha_{t} + \epsilon_{t},$$ $$\al...
For work, I'm working on an app where you essentially forecast the failure rate of the overall machine through different factors such as the historical failure rates for the components used to build it or the failure rates of the factories that manufacture it, or even the historical rate for the machine itself. The ide...
After writing this post, I've realized that I am running around in circles, chasing my tail. Any help approaching this problem would be greatly appreciated, as I think I just need to bounce ideas around and don't have colleagues that can help with statistical methods at my new position. I am working on an incomplete lo...
Goal: Determine if a machine is defective Say I am going to give the same treatment to a group of people. I have a machine that will randomly split them into $2$ groups before giving the same treatment ($50\%$ chance of being in either group). Treatment has a known success rate of about $20\%$. So, chance of a successf...
Inspired by this post on the difference between explaining and predicting. I want to ask is mixed model primarily used to get better explanation (such as, but not limited to, getting better coefficients and standard errors, or being able to decompose the variation), or is it primarily used to get better prediction? ...
Given a classifier (SVM) classifying in 2 'classes' (+1 or -1) for prediction purposes. It has an AUC score of 0.28, meaning its success rate is lower than just random predictions. If I just do the opposite (ie: classifier says it'll be -1, so I'll assume it'll be +1 instead), does that mean my success rate in predict...
I have monthly sales data of 500 restaurants for one year. For the same restaurants, I also have customer defection or dissatisfaction rates. I want to create a composite score that can rank restaurants based on their performance on sales and customer satisfaction. Something similar to customer life-time value, but a...
I have a model where time is the response variable. I'd like to generate confidence intervals for the estimates. I have established that the error in the estimation is roughly normally distributed (it may be more cauchy). The Mean and Median are very different, with the median more accurately representing the middle of...
I have been using $r = \mu \ln(1 - n)$ to obtain pseudo-random numbers from an exponential distribution, where $\mu$ is the distribution mean and $n$ is a pseudo-random number from 0 to 1. Now I want to do the same thing, but use a distribution that has a scale parameter. Can I simply scale the result of the above eq...
I have developed a script using pythons scipy package to analyse a rather large model that I wish to solve, the model contains over 12gb of data, including over 500 parameters. Now running small simulations of about 0.5gb of data with 20 parameters can still take my computer a decent amount of time if given a reasonabl...
I understand how principal component analysis works. However, in a financial time series sense, I do not understand why the number of observations should be larger than the number of dimensions. I am having twenty securities (dimensions in this case) for ten time periods and I am told that PCA won't work here. Why woul...
I want to fit a GAM in R. My data are negative binomial. Plus they have a temporal autocorrelation. m1 <- gam(Y~s(X,Day), s(fDate, bs="re"), family=negbin(c(1,10), link = log), data=data) Resid <- resid(m1) acf(Resid) With the acf() function I have detected a temporal autocorrelation. Can I apply a correlation st...
Would data in two columns such as Shoe Size (variate x) and Number of Pairs (frequency f) be considered grouped or ungrouped data? Does grouped data necessarily imply the existence or classification via class intervals?
I have two normal distributions defined by their averages and standard deviations. Sample 1: Mean=5.28; SD=0.91 Sample 2: Mean=8.45; SD=1.36 You can see how they look like in the next image: How can I get the probability to obtain an individual from the overlapping area (green)? Is the probability the same as the area...
There are two Boolean vectors, which contain 0 and 1 only. If I calculate the Pearson or Spearman correlation, are they meaningful or reasonable?
I've seen a lot of interesting questions here about multiple imputation and also great answers that helped me a lot to impute my data. I've used Predictive Mean Matching, EMB and I would like to use Random Forest but I'm not being able to run the model (so sad). I also have results from the complete dataset. Overall, t...
I am doing feature selection using the command 'rfe' in the caret package (http://caret.r-forge.r-project.org/featureselection.html). This command uses a metric to find the optimal amount of variables and which variables that is. However, I would like to also see the other steps in the feature selection than simply the...
I am using the vegan package in R to do a redundancy analysis (RDA, a part of canonical correlation analysis). My response data is binary and my explanatory variables contains 0, 0.5 an 1. I get quite low eigenvalues (~0.05) and my question is how is the binary data affecting the eigenvalue? Will the variability always...
How bad is it to use pooled OLS instead of fixed effects when you have 7 years of panel data? From what I have understood, the risk is that the coefficients will be correlated with the error term, thus making the estimates biased. There will be some form of endogeneity. Would it help if I include year dummies in the po...
I am beginner with lme4 and I am seeking some advice on how to carry a variance component analysis. The data come from a real-world scenario, not from a designed experiment, resulting in a complex nesting structure: "Students" are examined on 4 different practical "Topics". For each topic the performance ("Scores") o...
Each teeth growths from the crown to the root. There are different stages previously described to divide this process, as Crown initiation, one half of the crown, crown complete, root one quarter, root and a half, etc. Each of these stages of each different tooth (incisors, canines, molars, etc) has its own typical age...
I would like to perform a combination of oversampling and undersampling in order to balance my dataset with roughly 4000 customers divided into two groups, where one of the groups have a proportion of roughly 15%. I've looked into SMOTE (http://www.inside-r.org/packages/cran/DMwR/docs/SMOTE) and ROSE (http://cran.r-pr...
I have this Bayesian network where variable C is dependent on variables A and B. I want to know how come $ P(B|C) = \frac{P(B)}{P(B)+(1-P(B))P(A)} $
Scikit Learn's page on Model Selection mentions the use of nested cross-validation: >>> clf = GridSearchCV(estimator=svc, param_grid=dict(gamma=gammas), ... n_jobs=-1) >>> cross_validation.cross_val_score(clf, X_digits, y_digits) Two cross-validation loops are performed in parallel: one by th...
I have trouble understanding the delineation of "non-parametric" methods. It seems to me most non-parametric methods are parametric, just on a different space than the "standard ones". Graph-based inferences are often described as non-parametric, but graphs are fully described by the set of adjacency matrix parameter v...
This question comes from trying to analyze my recent exam (exam I have given and corrected) statistically. I have a list of questions (20 in total) and each question is given a score from 0 to five, so total possible score is 100. Then I define pass/not pass via some cutoff (I give grades on the A-B-C-D-E-F scale, but...
Let $F$ be known continuous CDF of a continuous R.V. and $F_n$ represent the empirical CDF for sample of size $n$, hypothesized to be drawn from $F$. The Kolmogorov–Smirnov statistic is $D_n :=sup |F_n(x) - F(x)|$. In applying the Kolmogorov–Smirnov test, the key is that $\sqrt{n}D_n$ converges in distribution to the s...
Is there a way to statistically compare r-squared across 2 groups using nested models in multigroup analysis? I know how to use lavaan to test various other parameters across groups (e.g. regression coefficients, intercepts, variances...etc), but I can't find documentation for how to compare R-squared. Here is an exam...
I took several statistics courses in college but I found that my education was very theory driven. I was wondering if any of you had a text in Applied Statistics (at the graduate level) that you recommend or have had good experience with.
I was recommended on StackOverflow to ask this question here: for me it's dataviz question, but perhaps it's more algorithmic in nature. I have an ordered set of points in 2D, and would like to join them using some sort of spline to form a closed loop that does not intersect itself. This is, in fact, a single contour l...
Lets say I am interested in finding the correlation of the following two metrics. They are aggregations and include the same input A in their formula. Is it possible to talk about correlation of these metrics? With a satisfactory r-squared value, is it possible to use metric#1 as predictor of metric#2? Should I also be...
Is there anything nice I can say about the sum of two independent generalized Laplace variables, with different scales and sizes? i.e. are they distributed same as another generalized Laplace variable with some function of the moments, etc. Edit: the PDF of generalized {Laplace or Gaussian} is: $f(x) = C\exp\{-|(x-\mu)...
The general version: I need to estimate $f(A | X)$ where $A$ and $X$ are continuous and multivariate. I'd rather do it nonparametrically because I don't have a good functional form in mind and $\hat{f}(A | X)$ needs to be something like unbiased. I wanted to use a conditional kernel density estimator, but I realized I ...
In some circumstances the Chi-square test can be replaced by a test based on the binomial distribution. The common issue with using the binomial distribution is that it may quickly become tricky to calculate big factorials. However, one can easily use Stirling's approximation in order to approximate such function. My q...
I have a classification problem in which I'm using the --ect option for the multi-class algorithm. The output of the classifier is something as follows: 1.000000 805848386108096 2.000000 133087140195133 2.000000 598100953597523 3.000000 629273927146079 2.000000 547637911979064 1.000000 733923413306849 Where the first ...
I have seen tons of situation where the null hypothesis reads along the lines of $\mu = \mu_0$, but what if I wish to test is $\mu \leq \mu_0$? Or more complicated null hypothesis? For a more concrete example, let's say I have data which I believe is from $N(\mu,1)$, where $\mu$ is unknown. I want to test the null hypo...
I am trying to calculate the $\omega^2$ effect size for a two factorial (with two levels each) effect size for an ANCOVA with one covariate. Following deliberations from Howell (2012) I got the following formula for first calculating the variance components for each of the main and interaction effects (my two factors a...
I have two variables, one with 2 categories and one with 6 categories. To test, whether there is any relation between these variables, I performed Fisher's exact test, which gave a significant result. Now I want to know for which of the categories of the second variable respective subjects have a differing distributio...
I am working on a prediction problem that leverage sparse clinical datasets. Missing data rate is in the range of 80%. 1- I am wondering if there is any example of application of matrix completion to clinical or other datasets with such a missing rates. 2- Currenlty exploring glmnet, pcaMethods and SoftImpute pacaka...
In R, usually one performs a generalized additive model like so: library(mgcv) x <- gam(depvar ~ s(indvar1) + s(indvar2) + parametricvar) Say I want to explore the non-parametric interaction of indvar1 and indvar2. Is the following kosher? x <- gam(depvar ~ s(indvar,indvar2) + parametricvar)
I've been looking up all across the internet to see what "lag length" is. I want to perform an Engle Granger - Augmented Dickey Fuller test, but for ADF, it always asks to specifiy a lag. It seems to me that whenever I look up lag length, most people just have trouble determining what it should be. What is the lag le...
We have been collecting statistics on a queueing and processing system that powers part of our business. We have multiple servers processing items in a queue. We recently added new servers, and we want to know whether we're processing faster. By "processing faster", I mean something like this: Last week, all of our se...
First, a bit of background: I'm currently working on a project at work that produces variable width data. During a operation qualification I collected a bunch of data at low, nominal, and high levels. The data is all independent and I have no reason to expect anything but identical distributions part to part as the p...
Is there a statistical measure for nonlinear time series data that is comparable to $R^2$ value in linear regression (giving an idea of how well the fit is)? The data is not monotonic, so I cannot use Spearman's $\rho$; and it's not linear, so Pearson's $\rho$ is not valid here either. Data looks like below (It's mos...
I've just come across a statement in Good, P. I.: Resampling methods. Springer, 2001 and wondered if someone could explain it to me. If you want to construct a 95% confidence interval for, let's say the mean of a normal distribution then the bounds would be $\bar{X}\pm 1.96s/\sqrt{n}$ with $\hat X$ being the sample...
I'm working with count data (ticket sales, to be specific) and I'm having trouble fitting a model to it. I've tried a linear one and a transformed linear one, but the residuals end up being non-normal and having a non-constant variance. I've been trying to play around with other models (negative binomial, poisson, etc....
What does it mean to "condition on the margin of ____"? I lack statistical/mathematical training and phrases like these leave me bewildered and unsure where to look. In this post (Which are differences between the hypergeometric distribution and chi-square distribution), there is an example where @Glen_b uses the phras...