instruction
stringlengths
9
38.7k
The given pmf is for a geometric distribution and is $f(x_i|\theta) = (1-\theta)^{x_i - 1}\theta; ~x_i = 1, 2 ,\cdots, $ and the 1-parameter exponential family I have obtained is; $$f(x|\theta) = \exp \left\{ \log \left(\frac{\theta}{1 - \theta} \right) + x_i \log (1-\theta)\right\}$$I have tried to obtain the conjugat...
If: an insect lays $N \stackrel{d}{=} \mathrm{Pn}(\lambda)$ eggs the probability of each egg hatching is $p$ the events of eggs hatching are mutually indepndent, evaluate the expected value of the number of eggs that hatch and the variance. I'm struggling with finding the variance, so I'll show my working out for exp...
I would like to assess the relationship between one quantitative variable (blood biomarker) and one ordinal variable (food additive) but with non proportional gaps between elements, i.e. 4 categories with the following values: 0.1, 0.33, 0.4, 0.9 (values are increasing but gaps are not proportional between elements). H...
I was wondering if there exist formulas or reliable approximations (but not simulation or bootstrap based) to calculate the variance of the parameter estimates in logistic regression? If my model is $$ y\sim \operatorname{bern}(p) \quad \operatorname{logit}(p)= \beta_0 + \beta_1 x_1$$, I would want to find for example...
I'm new to time series forecasting and only got previous experience with image processing in therms of neural networks. My goal is to do create an ML forecasting model for time series data. Currently I'm reading up on papers and most of them talk about a "persistent/persistence model" which they use as a benchmark or c...
Word embeddings are often referred to as vectors. For instance, "Word embedding models are dense vector representations of words learned from a corpus of natural language" (Rosado, 2020). Would it be more precise to talk about word coordinates, or word scalars ? My rough understanding of embeddings is that they are rep...
So in power analysis I have only ever seen it explained like in this statquest video: https://www.youtube.com/watch?v=VX_M3tIyiYk Where you have two distributions and you're trying to see if they are really unique or if they come from the same underlying distribution. Can power analysis be used to change this situation...
I have some questions about mean and volatility. I have historical monthly data of CO2 closing price(2013.01~2022.03), $p_{t}$ whose length is 111. I preprocessed the data by computing $\ln{\frac{p_t}{p_{t-1}}}$ and have the data with 110 length to fit into GBM model. My objective is to predict forward 240 months(=20 ...
I am trying to study the relationship between the type of bariatric surgery and weight loss. This is longitudinal data with different BMI measurements per patient. This the formula of the model: lmer.bmi<-lmer(BMI~Treatment+Time+Sex+age+(1+Treatment|ID),data =mydata) And below: The conditionnal studentized residuals vs...
Table A Group Year 1 Year 2 1 0.4 0.45 2 0.3 0.33 3 0.2 0.6 4 0.1 0.12 5 0.07 0.11 6 0.03 0.06 7 0.01 0.02 Table B Group Year 1 Year 2 1 0.43 0.42 2 0.313 0.39 3 0.223 0.65 4 0.112 0.18 5 0.065 0.105 6 0.031 0.054 7 0.012 0.018 I have two tables named as A and B. the numb...
Hi CrossValidated Community, I have a very simple question about the interpretation of coefficients produced by fitting a negative binomial to some toy data. I generate the toy data by sampling from a negative binomial using four different mean values defined by the vector untreated_avg. I then repeated this process bu...
I have the following data data<-c(1L, 4L, 5L, 10L, 13L, 8L, 3L, 5L, 13L, 9L, 5L, 10L, 9L, 4L, 4L, 13L, 10L, 10L, 7L, 7L, 3L, 1L, 11L, 4L, 5L, 9L, 10L, 3L, 2L, 7L, 8L, 4L, 5L, 6L, 3L, 4L, 13L, 7L, 8L, 6L, 5L, 3L, 10L, 4L, 8L, 8L, 2L, 9L, 5L, 2L, 8L, 7L, 6L, 6L, 6L, 4L, 3L, 9L, 11L, 6L, 7L, 7L, 3L, 4L, 18L, 14L, 8L, ...
Let $X \sim U(0,1) $ and $Y \sim U(0,x) $. Calculate $$ \Pr(X >0.5 | Y= 0.25)$$ Is this a trick question ? Since $\Pr(Y = 0.25) = 0$, right ?
I have question about this tutorial. The author is doing hyper parameter tuning. The first window shows different values of hyperparameters Then he initializes gridsearchcv and mentions cv=3 then he fits gridsearchcv and uses eval_set what is the purpose using cv and eval_set both? shouldn't we use just one of them?...
I want to fit a ridge regression on ~ 47 variables and 12 of them I want to be positive (or at least non-negative). I'm using sklearn and doing the following: ridge = Ridge(positive=True) parameters = {'alpha':10**np.linspace(10,-2,300)*0.5} ridgeCV_fitted_local = GridSearchCV( ridge, parame...
I have a binary classification problem with Dataset N430 and predictors=146. Both Validation and training accuracies along with losses fluctuates. What would be the reason and suggest solution please?
Since it should vary from sample to sample, I suppose it should be a random variable. But if it is, when we write the variance of sample proportions, should we write an uppercase P-hat as the index notation of sigma? But in most textbooks and formula tables, it seems that a lowercase p-hat is usually used
The ARPA-E PERFORM datasets produced by NREL contain both historical and forecast data on load, wind power, and solar power. NREL offers the following piece of information about the day-ahead forecast data: Day-ahead forecasts are generated with a 11-hour-ahead lead time, a 48-hour horizon, an hourly resolution, and a...
I am measuring two related variables $Y_A$ and $Y_B$, where $Y_A+Y_B=1$, with different settings for $X$. I know that each $y$ does not physically depend on $X$, so it’s a constant, as I change $X$. Since $Y$ is a constant, one might wonder why do I even bother to perform this experiment with different settings of $X$....
In the XGBoost Documentation they specify the Gain term as \begin{equation} Gain=\frac{1}{2} \left[ \frac{G_L^2}{H_L+\lambda} + \frac{G_R^2}{H_R+\lambda}- \frac{(G_L+G_R)^2}{H_L+H_R+\lambda}\right]-\gamma \end{equation} Furthermore, it is stated that if the gain is smaller than $\gamma$, we would do better not to add ...
I would like to know if in multivariable Cox regression analysis there is a way to yield only models that include a variable of interest (and if no model is statistically significant to just answer that). I am studying a cell phenotype. This phenotype "high" is associated with graft loss by the log rank test and in an ...
I have two sets of data A (n=100) and B (n=10000).Given 40 data points of B match with A, I want to run some tests on the matched and unmatched data points to see if they are significantly different. For example, if the average points and reliability score for the matched and unmatched set is significantly different? I...
Say I have an obstacle course, which not everyone completes, though, globally, most do. I hypothesize that the treatment, drinking Gatorade, will cause an increase in the obstacle course completion rate (CR). Due to a fluke in randomization, the test group has a pre-experiment 95% CR but an in-experiment 98% CR. Wherea...
I'm using a Cox proportional hazards model to look at the relationship between coyote survival and various environmental factors. The model summary indicates that the proportion of natural habitat has a negative effect on the hazard ratio/positive effect on survival: coxph(formula = Surv(survTime, status) ~ propWST + m...
I have this function I wrote: def singleModelCV(data, target, model): features = data.drop(columns=target) target = data[target] state = 42 X_train, X_test, Y_train, Y_test = train_test_split(features, target, test_size = 0.2, random_state = state) k_fold = KFold(n_splits=10) score = np.m...
I’m by no means a beginner in stats but this is a very basic question after twenty years of not practicing my studies! I have five years of monthly data for a universe of companies, say 1600 companies. The universe of companies is not constant (in number or the specific constituents). At each time period I have a score...
Consider a random sample of observations X = [X1, . . . , Xn]. Why would we expect that, typically, the variables of the sample X are correlated, but the principal component scores obtained from these variables are not?
I was reading this blog post on bayesian neural networks, where the author shows that if we use as a variational distribution a product of delta function, then minimizing the loss function of a BNN is equivalent to minimize the loss function of a standard neural network with a l2 regularization mechanism. However, I h...
This is perhaps a malformed question, but I'll give it a shot. Let's say I have a pre and post measure of some outcome variable and a dummy variable treatment that is 1 if participants are in a treatment condition and 0 if control. Let's say I model the effect on the outcome variable simply with: lm(outcome_post - outc...
I would like to ask a question regarding a post-hoc analysis using R package emmeans. I did a LME model analysis of a study of 2 groups x 4 measurement sessions. Now I am using emmeans for post-hoc comparisons. I am interested in finding out if the values within each of the groups differ between the sessions and also i...
Good afternoon. I have defined a binary classification problem. Classes are based on country-level data on child undernourishment whereby a positive class is assigned to a country whenever it performs above the world median and a negative otherwise. Now, the predictor for these classes is not a model but an indicator....
just a quick question regarding main effects and interaction effects: For example, in a LME model like lme_model <- lmer(outcome ~ Group*Time + var1 + (1|Sub), data=datatable In the analysis there would be main effects of group, time (and var1), correct? Group x Time (or Group:Time , does it matter how I write it btw?...
I have a question regarding feature transformation for when some your features are skewed. I've seen online that depending on the skew (right or left) and how great the skew is, it is preferable to use different types of techniques. My question is: Can you scale features based on their skew? For example, if I have a fe...
The arithmetic mean of a lognormal distribution is greater than the geometric mean (which equals the median). So its percentile is greater than 50%. But how much greater? It depends on the geometric standard deviation, which defines the asymmetry of the distribution. What function defines the percentile of the arithmet...
THE ISSUE Apologies in advance, being primarily a biologist and only tangentially a statistician I hesitate to ask this question for fear of overly complicating a simple situation. That said, I have been reading through some posts trying to figure out the proper way to formulate a model for an experimental design where...
I understand that a 95% confidence interval should contain the value of the population parameter under the null hypothesis 95% of the time. That is, for $H_0: \theta = \theta_0$: $$ \begin{align*} &\Pr(|t| \leq t_{crit}) = 0.95 \text{ under } H_0.\\ \Rightarrow &\Pr\left(\frac{\hat{\theta} - \theta_0}{se(\hat{\theta})}...
My model has two moderators and two independent variables. All four have a quadratic relationship with the dependent variable. Y = f(x1, x1^2, x2, x2^2, m1, m1^2, m2, m2^2) I need to include the interaction term. But unsure what would be the right way if I want to just test for linear interaction [i.e., the level shif...
Let's consider a system of $n$ items, where each item has a lifetime $X_i, i=1,\dots,n$ i.i.d. Let's assume that one item is used and replaced whenever it breaks down. Let's also assume that the system is required to work over $T$ unit of time. If all items break down before $T$ it would cost $c$ per unit time. I'm tr...
I am working on a time series problem where I am trying to predict the temperature of a product in a refrigerator by using the information about the temperature of the air in the refrigerator with respect to time. So in our case temperature of the air is the independent variable and temperature of product is the depend...
I need to test if a baby's length is affected by the gestation period (in weeks). I started by testing the 2 variables for normality, but after getting conflicting results from the Shapiro-Wilk and Lilliefors tests (S-W p-value is 0.1316, Lilliefors p-value is 0.006419) for the gestation period, I looked at the qqplots...
I have a question about $ R^2$ is panel data regression. Let's suppose that I estimate the following model by random effects: $$ y_{it} = \alpha + \beta x+u_i+\epsilon_{it} $$ Then, by assumption, the overall $ R^2 $ is given by: $$ R^2=\frac{Var(\hat{\beta} x)+Var(\hat{u}_i)}{Var(y_{it})} $$ My question is, how do I ...
Lets say that we have a matrix of variables (the columns are variables and rows are the observations) called X whenre X = [x1, x2, ...., xp] where x1, x2, ...xp are variables. If I rotate the X, the X' (the rotated version of X) will have a different Covariance Matrix because x1', x2', ...., xp' are different than the ...
From the point of the unbiased estimator, there will still be a lower bound of covariance which will have nothing to do with FIM when it's singular, so I want to know are there some references about what's the consequences when FIM is not invertible, not limited to Cramer-Rao lower bound, I just want to know as systema...
Let's suppose that $X, X_1, X_2, \ldots, X_n$ are i.i.d. continuous random variables. Let's define $D_i$ as the difference between $X_i$ and $X$: $$ D_i = X_i - X $$ My end goal is to derive the distribution of: $$ \sum_{i=1}^{n} I_{D_i < 0} $$ Since the $X_i$ and $X$ follow the same distribution, the $D_i$ should be i...
If μ = 4 and n = 2 and suddenly I have a new datum of 22 I can add 1 to n and recalculate μ as (4*2+22)/3 = 10 without even looking back at the old data. This can be used as an optimization to reduce recalculations as data grows. But does it have a name? Ideally a name that would drive someone to a definition of the fu...
I will try my best to explain this simple doubt that I have. I have three responses (Increased, decreased and no change) and I have calculated the percentage for each. For instance, for X case- 46% showed an increase, 34% showed a decrease and 20% showed no change (similarly I have 12 such cases); now to state that 46%...
I am working on the diamonds dataset. In it, we model the price of those diamonds based on several predictors. Three of them are categorical variables (cut, color and clarity) and the rest are numerical. I have identified the numerical variables that will make good predictors but I don't know how to do that for the cat...
My estimator looks like this: $$ \hat\theta(X) = \arg\max_{\theta} \frac1N \sum_{n=1}^N f(x_n|\theta) $$ Here, $f(x_n|\theta)$ is some arbitrary function: it's not a logarithm, and the sum is not a log-likelihood. I don't think that there's a closed form expression for $\hat\theta(X)$, so I'm using numerical optimizati...
I was having a discussion with someone regarding OR’s estimated trough a logistic regression and then he claims that OR’s for continuous variables can only be estimated trough a logistic regression. AFAIK, OR’s are defined only for categorical variables so I was kind of confused. He then proceeds to claim as well that,...
Let $S^2 = X/\nu$ where $X \sim \chi^2(\nu)$ and define $W = \frac{1}{S^2}$. In Welch's paper, "On the comparison of several mean values: an alternative approach" (1951), he gives the approximation in equation 9 on page 332*: $$E(\sum_{k \geq 0} \frac{(W-1)^k}{k!}\partial^k) \approx 1 + \frac{2}{\nu}\partial + \frac{1}...
I am trying to replicate the first Sequential example in this video: https://www.youtube.com/watch?v=WAciKiDP2bo using the following code import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers from tensorflow.keras.datasets import cifar10 (x_train, y_train), (x_test, y_test) = cifar10...
Since Dimension 1 is longer than the Dimension 2, I want to make the plot vertically long rather than horizontally long so that it's easier to include it in my thesis. But is it acceptable to make Dimension 1 the y axis and not the x axis?
I have a dataset of multiple continuous variables associated with a target value. I would like to estimate the probability distribution of the output given new data. (I have around 50-120 features with 2.5 million samples.) In an MLP classification approach, I would bin the output into 1000 bins(classes) then train it ...
I am working on a medical research project where I am trying to find the associations between specific maternal factors and neonatal limb ischemia (NLI) to declare the maternal factors as "risk factors for NLI". I am trying to find a way to estimate the percentage of a specific maternal factor being associated with NLI...
I have a question related to clustering comparison and biostatistics. I performed 2 clusterings (let's call them A and B) on a large gene set, so for each gene I have 2 cluster attributions. each clustering contains 10 clusters. I have a specific subset of genes in which I am interested in this gene set. My goal is to ...
I am trying to predict a value over time. I have historical data that I have used to calculate PDFs for the change over various time intervals. If I'm trying to predict the value at time T0 and start at T-10. I measure the current actual value, multiply it by the T-10 PDF and get prediction distribution. Time passes an...
I am new to clustering and am a bit confused on how the following code can compute centroid information without the original euclidean vectors. import numpy as np from scipy.cluster import hierarchy import matplotlib.pyplot as plt # Create an array of distances x = np.array([100., 200., 300., 400., 500., 250., ...
I am trying to compare forecasts of a series, and have several trained estimators which are deep neural networks with arbitrary architecture. I'd like to compare the accuracy of their probabilistic forecasts for a forecast horizon > 1, for instance using the python properscoring library to calculate a CRPS, which judge...
I want to create a statistical model of the following model inputs $v_{in}$ and outputs $v_{out}$ that consist of continuous random variables. The final aim is to calculate the conditional distribution $p(v_{out}\mid v_{in})$. $$v_{in} = \begin{bmatrix} d_{pre} \\ P_{sys} \end{bmatrix} \quad v_{out} = \begin{bmatrix} d...
I'm reading "A Modern Maximum-Likelihood Theory for High-dimensional Logistic Regression" by Pragya Sur, and trying to recreate Figure 2, for my own edification. The covariates, $X$, are i.i.d. $N(0,1/n)$, where $n=4000$ and there are $p=800$ predictors. I put together a python simulation to sample from that distributi...
I am observing multivariate time series with some of its variables being boolean. One example of such observation has its var1=1 during all time series, and another observation has var2=0 for example during all time series. So what I mean is all observations must have all its boolean variables constant. My question is ...
Let's start with a toy example. We have an RCT with 2 treatment arms (Treatment A vs. Treatment B), and one outcome. When we analyse survival curves according to the treatment arm, we found the following scenario: It seems that the proportionality-hazard assumption is violated, and we therefore cannot use a Cox Regres...
I'am modelling the effect of individuals' chronotype on their respective school performance. So, my dataframe consist of the subjective and school declared performance (dependent variable) of middle school students (random variable), and their chronotype (independent variable). The students' subjective performance was ...
I'm trying to make this graph (of the monthly withdrawal rate of natural gas in the US) stationary, though I can't seem to do so. I've tried differencing of multiple orders, logging then differencing, and cubed rooting then differing. I plan to forecast this data with ARIMA (maybe SARIMA), so I need a way to recover ...
I'm reading Elements of Statistical Computing: Numerical Computation. And this book is the only one I've found that deals with computational complexity in the context of statistical inference. Does anyone know any other references? (books, articles, blogs, etc.)
In a setting with a binary $y$ like dog/cat, a reasonable statistical model is to posit that the probability parameter $p$ of a $\text{Binomial}(1, 0)$ distribution is some function $f$ of features $X$. This leads to many common machine learning approaches like logistic regression and neural networks. In a setting with...
I am currently going through the book Practical Guide to Logistic Regression by Joseph Hilbe and there is this part I came across: For whatever reason, it gives this warning, but sorta trails off and doesn't explain why this is the case. As far as it is my understanding, the p values are calculated in a similar fashio...
Let's say I have data for 6 days. The values for these days are 1, 2, 3, 4, 5, and 6. So if I want to calculate a 2-day moving average of these data points, I'll get 1.5, 2.5, 3.5, 4.5, and 5.5. This means that I'm left with only 5 data points of the moving average, compared to 6 data points of the original data. It al...
Suppose we have a random variable $X$ that can take real values from 0 to 100, according to a distribution $f$, for which the expectation $E(X)$ and the variance $SD(X)^2$ are well defined and finite. We define another variable $Z = \frac{X - E(X)}{SD(X)}$ Suppose I know that for a particular realisation of $X$, say $x...
Consider $X=Y_{1}+\cdots+Y_{n}$, where $Y_{1}, \cdots, Y_{n}$ are $\mathrm{n}$ independent Bernoulli random variables with $Y_i\sim Bernoulli (1,p_i)$, $i=1,2,\cdots,n$. Then $X$ has a so-called Poisson-binomial distribution of parameters $p_{1}, \cdots, p_{n}$ and $n$. Suppose $n=20$ and $p_i=0.5+i/50$, $i=1,2,\c...
There is a time series Y, which is the remaining part of the initial time series after removing the trend and seasonal periodic components. And there is also a time series X, which represents the change of water level. (the data file is here: https://github.com/jacktang/dataset/tree/main/decompose) I've read some paper...
Let $y_i \vert p_i \sim \mathrm{Bernoulli}(p_i)$, $p_i = F_h(X_i^\prime \beta) \ \ , \ \ h = 1,2 \ ,\ \ X , \beta \in \mathbb R^p$, where $F_1(x) = (2\pi)^{-1/2}\int_{-\infty}^x \exp(-t^2/2) \ dt \ $ and $F_2(x) = \big(1+\exp(-x) \big)^{-1}$. So if $h=1$ or $h=2$ we have the probit or logit model respectively. In chap...
Is it possible to distinguish two variables that are just correlated with each other but are not part of the same phenomenon, from two variables, that are part of the same phenomenon and share a common superior/higher latent factor? I mean a mathematical distinction and not a theoretical definition of a variable. Let's...
I'm building a toy program where the user can do algebra on uniform distributions on $1, \ldots, n$ and lists of integers. Example expressions are $\texttt{high 3 of 4d6}$ and $\texttt{first 5 of shuffle 1..52}$. My program has two major functionalities: calculate the distribution of the input expression, and sample it...
I am quite an amateur in statistics. I have data where I would like to test if I can perform parametric or non-parametric testing depending on if the data is normally distributed or not. The data has one dependent variable "time to fatigue" that I wish to study and two grouping factors: "length" and "velocity". The gro...
Let us say I have daily room booking data over time. Rooms have features X like aircon, number of sleeps/person. Rooms can be booked for a number of nights (NONs) between 1 and 7. They also have a price per night and prices for shorter NONs tend to be larger to encourage longer stays. I would like to be able to predict...
Suppose that we have an OLS estimator $\hat{\beta}$. Also, assume that we know $\hat{\beta}\sim N(\beta, \Omega)$ and have an estimator for $\Omega$, say $\hat{\Omega}$. Here, I want to test the following composite null hypothesis: $$H_0:\quad M\beta\geq0 \qquad H_1:\quad M\beta<0$$ where M is a constant vector of prop...
After reading about interactions contrasts in emmeans, I just wanted to make sure I understood it correctly. Say I have a model with a group*time interaction effect, and I set up emmeans as follows: emm <- emmeans(lme, ~ Group * Session) And then use contrast(emm, interaction = TRUE, "pairwise", adjust="mvt") It outp...
I am trying to figure out how stacked generalization works? I think we train n models on the same dataset and get their class probabilities. Then these class probabilities are fed into another model. If dataset has 2 classes and 100 instances and we use 5 base models then we fed 10 columns and 100 rows(each model's cla...
So I'm taking a stat's class that has introduced z-score regression. According to my professor, z-score regression gives us the "line of best fit" when the data has a linear structure. I've previously taken a machine learning course where I learned that the "line of best fit" was obtained through linear regression. My ...
I'm a beginner in time series forecasting and I'm not sure if I understood correctly the meaning of forecast horizon. I was considering horizons as points in the future for which we would like to predict a value. For example, a horizon of 30 days would, in my approach, means that we want to predict the 30th value of a ...
Edit Sep 19 this answer on Mathoverflow matches simulation results Suppose $x_i$ come from 2-d standard Normal centered at 0. What is the range of $a$ for which the following iteration converges almost surely? $$w_{i+1} = w_i-a x_i \langle w_i, x_i \rangle$$ Mean norm of $w$ diverges for $a>2/3$ but this is vacuous bec...
Hi I am looking at elemental concentrations in pectoral fin rays the year before spawn, year of spawn, and the year after spawn. I will be creating a logistic regression model to see if I can predict the year related to spawn using the elemental concentrations measurements. Would the response variable (year before, spa...
My understanding is that in LDA, we maximize the joint density $ P(X,y) $ using $P(X|y)$ rather than posterior density $P(y|X)$ using $P(X|y)$. In the book "Introduction to Statistical learning with R", the authors say otherwise. Though they do not provide a derivation, they say the expressions for $P(y|X)$ are to be m...
I have an RNN based neural network that models a 1-1 relationship for inputs over time. The model output is sigmoid activated, and the process I’m modeling is always monotonically increasing, so the model output for a typical example will look like a stretched/scaled sigmoid if you plot its outputs over time for a spec...
I am replicating some techniques from Advances in Financial Machine Learning by Marcos López de Prado. In Chap 17, I am doing the Supremum ADF test and Quantile ADF test. It seems that they do not follow a standard ADF t-distribution. I wonder how to use Monte Carlo simulation to calculate the right tale critical value...
I'm using the statistical software G*Power to find the minimum sample size needed to detect whether or not the difference in two proportions is statistically significant in an AB test I'm setting up. I have found plenty of sources stating that the chi-squared and the z-test are equivalent in this circumstance (i.e. Exa...
I am quite an amateur in statistics. I have data where I would like to test if I can perform parametric or non-parametric testing depending on if the data is normally distributed or not. The data has one dependent variable "time to fatigue" that I wish to study and two grouping factors: "length" and "velocity". The gro...
I did some research and I understand that there is no right answer in choosing the number of layers and neurons in a neural network architecture. I have seen some guidelines and rules of thumb in posts and blogs. Even though they are helpful, I am wondering if there is any academic paper on them. Do you have any study/...
Consider tossing a fair coin; you win only if you get k+1 consecutive heads after k successive tails. What is the probability you win in finite trials? I encountered this problem in an interview. My initial thought was to calculate the probability that the game never stops: $P=1-\frac{1}{2}-\frac{1}{2}^2-.....$. Howeve...
If I recall, this example forms a graph with (earthquake, burglary) being the two parents of a child (alarm), and the statement is that the two parents are conditionally independent only when child is unknown. The counter-example is, the alarm goes on (child is known), and there was no burglar (one parent is known), th...
It's been a while since I've had to mess around with statistics like this. I only have the mean, 25th percentile, median, and 75th percentile. I am attempting to predict with reasonable accuracy what value would fall at the 60th percentile. Is this possible with the data I have available? Or would I need more? An examp...
Lets say I want to run a logistic GLMM like so: Binary Outcome ~ Subject Composite Score 1 * Subject Composite Score 2 * Item-Level Variable + Random Effect Item + Random Effect Subject I was reading in Logistic Regression Models by Joseph Hilbe that interactions between multiple continuous variables is erroneous fo...
Suppose that I'm training a machine learning model to predict people's age by a picture of their faces. Lets say that I have a dataset of people from 1 year olds to 100 year olds. But I want to choose just 9 (arbitrary) ages out of this 100 age dataset and still the model should be able to predict the age of a given pe...
I have two-time point data, where I want to measure "change" in a dependent variable (si_ch_r) predicted by change in three independent variables and their two- and three-way-interaction effects (pb_ch, tb_ch, bhs_ch). I have used raw-change / difference-scores to model "change". I want to use a mixed-effect model so t...
Which of the following model has the highest in-sample $R^2$ in the same dataset: OLS linear regression, lasso, or ridge? My guess is OLS. Am I wrong?
What does predictive discrimination mean and how is it different from classification? My question is prompted by Frank Harrell's comment: Predictive discrimination is much more general a concept than classification. ... This comment is at odds with my current thinking that predictive discrimination is simply an old-f...
The terms "type I" (or "alpha) and "type II" (or "beta) error, to denote false positive and false negative, are often used. What is the history of those terms?
I’m having some difficulties in selecting the appropriate model(s) for analyzing survival data which includes recurrent events and (potentially) competing risks. There is no particular ‘terminal’ event in the study. The dataset describes groups (dyads) in which 2 subjects play with each other for a defined period of ti...
I am about to conduct a meta-regression analysis to fit some age-related changes. Since the GAMLSS approach is highly suggested in the normal regression of such data, I want to apply GAMLSS to my study. However, I could not find avalible packages to achieve this. Could any one help me? If indeed there's no available pa...