Sheridan Grant
  • Member for 5 years, 11 months
  • Last seen more than a month ago
What‘s wrong with my proof of the Law of Total Variance?
Accepted answer
6 votes

The third line is wrong, because you don't have $\text{E}[X|Y]$ in the second line. For example, if $Y$ is Bernoulli(1/2) and $X$ is 1 if $Y$ is 1 and -1 if $Y$ is 0, then $\text{E}[(X-\text{E}[X|Y])^...

View answer
How do I use a beta distribution to model this bimodal data?
6 votes

If the only values the data take on are $\{0,25,50,75,100\}$ then the Beta isn't an appropriate model since it's continuous and the data are highly discrete. If this is the case, and you don't want to ...

View answer
In stepwise regression, how to interpret non-significant variables?
Accepted answer
4 votes

If you are interested in interpreting coefficients and significance/p-values, don't use stepwise regression. See this post. In fact, stepwise regression is basically always a bad idea in this day and ...

View answer
anomaly detection in time series training data
Accepted answer
3 votes

Your basic idea is right; to formalize it, I would say you should just "de-trend" the data and then apply anomaly/changepoint detection. So, fit a time series regression model that accounts for the ...

View answer
Maze game: Probability of path
Accepted answer
3 votes

I presume you mean to ask which direction should you attempt in order to get to 2 in the smallest expected number of moves--you'll reach the finish with probability 1 eventually. You have to get to ...

View answer
Methods of variable selection
2 votes

This sounds like a bad idea, though I can't exactly tell what the criterion for adding a predictor to the model was. How can a "predictor's odds ratio" be "changed" by 5% if it was ...

View answer
Mostly Harmless Econometrics, explanation of solution to the population least squares problem
2 votes

"First-order condition" in optimization just means taking the first derivative and setting it to zero. The second derivative here is clearly negative, so under mild regularity conditions the first-...

View answer
Feedback regarding my script and lme4package
2 votes

The use of hierarchical random effects here is warranted, I think, and it sounds like you agree. What we "recommend" as far as the fixed, effects, however, depends on the scientific question. If you ...

View answer
Comparing how relationship between two variables changes after event
Accepted answer
2 votes

Create a binary dummy variable that is 0 before and 1 after. Run the regression with the dummy variable and an interaction between x and the dummy variable. The interaction coefficient will tell you ...

View answer
What stats should you include on poisson regression plot
2 votes

First, I'd change the axes to say "Months on Medication" and "Number of Patients." I'd report the number of zeros, and be able to verbally address the issue of zero-inflation. Definitely report the ...

View answer
Distribution matching by subsampling
2 votes

I'm not sure if there's a better term, but what you are doing is known as "achieving balance" between the two groups on the covariate var. It is closely related to the technique of "matching," which ...

View answer
Using KStests to find my estimator is a good fit with my distribution
1 votes

There are a few problems here some of which are just terminology. You don't have a distribution, you have data. You want to estimate a distribution from your data. An MLE isn't a distribution, it's a ...

View answer
Using standardization methods to exclude erroneous outlier values
1 votes

There seems to be a hangup in the comments over "outlier removal," which is often done without thinking and can be a bad idea. You're just looking for error detection--removing errors, I agree, is ...

View answer
Determining best cutoff value between 2 groups
Accepted answer
1 votes

Here are a couple options: Do a grid search to find the point that discriminates best on your data: just test the accuracy on a large list of points between the means or medians of your data. Sounds ...

View answer
How can one model the density of a distribution of choice?
1 votes

Because $X$ is discrete (it takes on discrete names as values), it doesn't have a density, but rather a mass function. The most straightforward way of estimating this mass function, or pmf, is to ...

View answer
poisson vs ordinal regression
1 votes

If the non-negative integers have true integer "meaning" (i.e. 3 represents a quantity three times what 1 represents), and particularly if they represent arrivals in a process, then Poisson regression ...

View answer
Analyzing ABn test when normality is not met
1 votes

With 48,000 observations, even if the data is pretty highly skewed the t test might do okay. As nba2020 suggested, you could bootstrap your sample and observe the distribution of means, though this ...

View answer
How to predict if an occurrence will repeat (e.g. repeat customers)?
1 votes

Note that for each customer, the only information you have is the total number of visits ("has_visited" and "repeat_customer" are both functions of the total number of visits). Since you don't have ...

View answer
Unbiasedness of Bayesian Posterior Mean Under Bayesian and Frequentist Models
1 votes

Take the Bayesian perspective, supposing that $E[m(y)\mid\theta] = \theta$ (posterior mean is unbiased). Then $$E[\theta m(y)] = E[E[\theta m(y) \mid \theta]] = E[\theta E[m(y)\mid\theta]] = E[\theta^...

View answer
Confidence Interval of Categorical Data with Multiple responses
1 votes

If there is just one category of interest, e.g. lemons, there's no problem with "binarizing" it and extracting a CI for the population proportion who like lemons. However, if you do this for each ...

View answer
Using k-means to segment customers in the positive class
Accepted answer
1 votes

I'm assuming you've also observed some covariates for each customer beyond whether or not they canceled. Your suggested approach, then, would simply give you 4 groups of customers who canceled that ...

View answer
Is binning of continuous data always bad for statistical tests?
1 votes

Related answer here from just yesterday. If the distribution you observe is the distribution you wish to test, then binning forfeits information and will thus on average reduce your ability to (in ...

View answer
L1 distance between categorical distribution and any arbitrary estimator?
1 votes

I'm assuming you want a result of the form $P(d_{TV}(p,q) = \frac{1}{2} \sum_k |p(k) - q(k)| > \epsilon) < f(n,\epsilon)$. If your estimator is the empirical distribution, then there are general ...

View answer
Mann Whitney Wilcoxon test
1 votes

Mann-Whitney only tests for a difference in medians when you assume that the only difference in the distributions of the two samples is the location, and not the scale or shape, of the distribution, ...

View answer
Testing for Stochastic Dominance - Mann Whitney with Unequal Variance
1 votes

First, let me point out that Mann-Whitney does not test stochastic dominance. It tests the null hypothesis $P(X > Y) = P(X < Y)$. If $X$ is uniform on $[0,1]$ and $Y$ is 1 with probability 0.9 ...

View answer
Showing $Cov(\epsilon, b_0) = 0$ or $Cov(\epsilon, b_1) = 0$
0 votes

The premise in the title of the question isn't correct. The estimated $b_0$ and $b_1$ are by definition functions of the observed data, which are functions of the $\epsilon_i$. Unless the question is ...

View answer
which is the meaning of scatterplot between a pair of 2 consecutive pseudo random numbers with respect to the independence of the sequence?
0 votes

You're right that this is a very difficult problem--it's hard to test independence in general without a lot of data. There are loads of test statistics you can construct and test to try to reject the ...

View answer
Regression with ranked and truncated dependent variable
Accepted answer
0 votes

Good question--models exist for exactly this situation, which is called a "top-$t$" ranking (we only observe the top $t$ items of the potentially infinite ranking). Plackett-Luce tends to work well in ...

View answer
Correlation of factors in a variable
0 votes

Sure--there are lots of forms of correlation/dependency measures for binary and categorical measures, such as this. Without more information about the application, we can't really direct you to a ...

View answer
Should the existence of a closed-form solution inform the choice of robust regression method?
0 votes

So you want to minimize absolute error instead of squared error, I take it. I don't think you're going to find something with an analytical solution, but Support Vector Regression does what you want, ...

View answer