instruction
stringlengths
9
38.7k
I am helping to publish a meta-analysis conducted by a student. The analysis has calculated a standardised mean difference (SMD) by comparing the post-intervention scores of the intervention and control groups. However, many of the primary studies had very small samples that produced what appear to be large baseline im...
I know that RSS explains the deviation between the model and actual data by measuring the square of the difference between them. I found this metric in one of the questions sir gave me. What is the difference between this and RSS? Can the value of this be bounded? $$\sqrt{\frac{1}{n-p-1}\sum_{i=1}^n \frac{(y_i-\hat{y_i...
Is there a formulaic relationship between RSE and sample variance? I have been self-studying data analytics in my spare time, and to get a better understanding of RSE and sample variance I have been playing around with a bit of code in RStudio: x <- sort(rnorm(20, 5, 5), decreasing = FALSE) y <- sort(rnorm(20, 5, 10), ...
Let $X_1,…,X_n$ be independent, but not necessarily identical, non-negative random variables. Let $Z=\max_i(X_i)$. Fix a real $\tau > 0$. Is there a way to lower bound $$\mathbb{E}(Z|Z>\tau) > c \mathbb{E}(Z)$$ for constant $c>1$ (that can obviously depend on $\tau$). For example if $\tau$ is the median of $Z$ or $\mat...
I have a study in which a well-known previously validated questionnaire (like Beck Depression Index, NEO-FFI, etc.) is used. My question is: do I need to calculate Cronbach's alpha for this questionnaire on my data set? Or, in other words: do I need to demonstrate reliability of a well-known previously validated questi...
I have a CFA result which is puzzling me and I am trying to determine why I am getting the results I am getting. I have a dataset of 134 rows. I have a factor which I run a CFA on using lavaan. I have checked to make sure I have enough samples (KMO test) and there is enough collinearity (determinant). My data is not no...
I want to compare the performance of three groups with quite a different group size. In order to get a 'fair' ranking I thought I might not compare totals or averages but excess rates. Let's say I have the following: So group C is more than twice as big as group A. Within a group there are some members that fulfill a ...
I am trying to understand when to use Shapiro-Wilk Test and/or Kolmogorov-Smirnov Test for normality. Currently, I am following this website How to Test for Normality in R (4 Methods). This paper Descriptive Statistics and Normality Tests for Statistical Data says: The Shapiro–Wilk test is more appropriate method for ...
I am trying to determine the area of the ellipse which contains the true mean of $(X_n, Y_n)_{1\leq n \leq N}$ with a probability of 90%. The 90% confidence ellipse area, or C90 area. The sample consists of N = 3000 $X,Y$ coordinate pairs. The problem is that definitions I've come across differ in how they end up calcu...
I want to apply support vector regression (SVR) model parameters to a higher spatial scale using the predict function, but the results are wrong. Here is how the resulting raster is: The steps I followed were: perform regression using the svm function at a coarser spatial scale using the predict function and a fine r...
In this slide (from A TUTORIAL ON ACCOUNTING FOR COMPETING RISKS IN SURVIVAL ANALYSIS), there are two ways of plotting the cumulative incidence in a competitive risk setting. What are the differences? Is the Non-parametric approach equivalent to KM but without its biases regarding competitive risks and Fine-Gray a regr...
I’m currently training an SVM for multi classification, and to choose the C and gamma parameters, I'm using Grid search combined with k-fold CV. I get a cross validation accuracy of 99.8%. I am not quite sure of what training score means, but I suppose it’s just the accuracy you get by trying to predict the training se...
Consider two independent trivariate normal random variables $X$ and $Y$. The means are non-zero and the off-diagonal elements of the covariance matrices are non-zero. $X$ and $Y$ does not follow the same distribution. What is the expected value $E\left[\lVert X-Y\rVert_2^{-1}\right]$, and how can it be derived?
Suppose I want to compute the probability that Argentinia wins the worldcup semifinal Argentinia - Croatia. I have two independent sources of information about this probability, whereby source A says that Argentinia will win with probability $p$ and source B says that Argentinia will win with probability $q$. The two s...
Recently I've been working with the distribution described by the pdf below: $$ f(x) = \begin{cases} \frac{2}{3(b-a)}(1+\frac{x-a}{x-c}) & \quad a<x<c \\ \frac{2}{3(b-a)}(1+\frac{b-x}{b-c}) & \quad c<x<b, \end{cases} $$ $$a<c<b, a>0.$$ Essentially, this describes what I call a "raised triangular" distribution, meani...
As the title reads, the results from the linear and first degree polynomial model are different and I am not sure why. Any ideas why this might be? linear_model <- nlme::lme(mpg ~ vs * gear, random = ~ 1 | ID, data = mutate(mtcars, ID = dplyr::row_number())) summary(linear_model) Value ...
Given: [] Find the conditional probability distribution of theta given Sn and compute the conditional expectation. I believe the distribution of Sn will be a binomial with mean ntheta and variance (ntheta)(1-theta). I am not sure how to apply this into Bayes' Theorem to get the conditional distribution of Theta given S...
I've collected some survey data on homeless individuals, surveying their drug use, education level, age, gender etc. I hope to run a logistic regression to see how impactful homelessness (+other dependent variables) are on the likelihood a child uses drugs. DrugUser= B0 + B1Homeless + B3X3 + ... + u However, due to the...
My course notes (3rd-year module in Bayesian Statistics, unpublished) contain the following section. Assume we have data on the number of people queuing at an ATM at a specific hour for several randomly chosen days, and that we are interested in the mean time between two consecutive arrivals to the queue at some arbit...
How is multicollinearity calcuated for an ordered logistic regression if R^2 is not determined for this type of regression? Because the formula for vif says: 1/(1-R^2) In R the looking up ?vif says that the polr function in MASS package can be sued to determine vif. However in the regression summary of polr R^2 is not ...
I have a database (annual frequency) that gets periodically updated. As a result, every point in time (year) has a different number of observations: each version, adds a new data point to every time point. This means that earlier observations have more data points than later observations. Also, the number of available ...
I have some statistics for two samples from a population: Sample size, Percent relative standard error (PRSE), mean, percentile 10, percentile 25, median, percentile 75 and percentile 90 I've no other information. Is there any statistical test that I can tell the distribution of these two samples are significantly dif...
How I approach the following continuous time random process question? $W$ has a constant PSD, so it is white noise. So, $X$ is a normally distributed RV, and $Y$ is a normally distributed RV with the same mean as $X$ and 2 times its variance, I believe. To answer the question fully, I would need to compute the mean and...
I've learned moderated mediation analysis from this book chapter. However, I'm looking for a method for "mediated moderation" and I cannot find it. For example, we are trying to reduce the correlation between X and Y. We already see our treatment T has significantly reduced the correlation, but we need to figure out wh...
In the context of segmentation, what is the difference between IoU and sensitivity? It sounds to me like they describe the same formula in different contexts but I might be wrong. When true positivies are denoted as TP and false negatives as FN, sensitivity is TP/(TP+FN). IoU is intersection/union, but intersection is...
So let's say I have two random variables, $X \sim (0,1)$ and $Y \sim (0,1)$. If I want to make a random variable $Z$, a linear combination of $aX + bY$ such that $\text{Corr}(Y,Z)$ is always equal to 0.20, this would've been my intuition and approach: $$\text{Corr}(YZ) = \text{Cov}(Y,Z)/ \sqrt{\text{var}(y)* \text{var...
I'm a 22 year old Statistics student with a big problem to solve. English isn't my first language, so I apologize in advance for any mistakes in my grammar. I'm trying to make a short-term gas consumption forecast for a small city. In my country, gas consumption has its peak in the winter months (may, june, july, augus...
Hi I have the following regression model: \begin{align}y=\beta_0 +\beta_1x_1+\beta_2x_2 +\beta_3 \ln(x_3)+\beta_4[\ln(x_3)\times x_1] + \mu_{ti} \end{align} How would you interpret $\beta_4$? My own thinking is that it is the $\frac{\beta_4}{100}$ is the ceteris paribus partial effect of a 1% increase in $x_3$ on the p...
Let $\mathbf{x} \sim \mathcal{N}(\boldsymbol{\mu}, \Sigma)$ be a random vector following a multivariate normal density distribution. I am interested in the density function of the transformed variable $$z = \mathbf{x}^\top \mathbb{A} \mathbf{x} + \mathbf{b}^\top \mathbf{x}$$ where $\mathbb{A}$ is a constant matrix and ...
Suppose I have $q$ censored covariates, say $X_1, \ldots, X_q$ which are all left-censored with censoring values $\mathbf{d} = d_1, \ldots, d_q$. If I assume that the $X_i$ are from some multivariate normal distribution with parameters $\mathbf{\mu}$ and $\mathbf{\Sigma}$, how can I write down the likelihood to find a ...
If I understand correctly, in Deep-Q we have two networks: the target-network and the q-network During the learning step - we calculate, (next_state) $\rightarrow$ target-network $\rightarrow$ (future-rewards) (state) $\rightarrow$ q-network $\rightarrow$ (q-values) q-values* = reward-sample + $\gamma$ * $\max$(future...
I am trying to learn cox Ph for gam. I found an example code in mgcv package to generate data for cox ph gam. However I can not understand a point there. eta is the summation of the basis functions. But to produce eta, I found a different equation there. Following are the code from mgcv: ## Simple simulated known truth...
Suppose I'm attempting to use linear regression but instead of $$y_i = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \beta_3 x_3 + \beta_4 x_4 + \varepsilon_i,$$ for scientific reasons, I know that $β_2=\alpha\beta_1$ and $β_4=\alpha\beta_3$. So my formula is actually: $$y_i = \beta_0 + \beta_1 x_1 + \alpha\beta_1 x_2 + \beta_...
Unfortunately for privacy reasons I cannot disclose the original data <Edited: snippets of the original data below>, but I'm running a regression model like this on R. Call: lm(formula = Score ~ Agent * Target, data = .) Residuals: Min 1Q Median 3Q Max -3.1997 -0.4643 0.2133 0.6034 2.5762 Coef...
Suppose I have two lists with columns rank, app_name, weight that look like this: list1: [(1, "app1", 0.6), (2, "app3", 0.2), (3, "app4", 0.1), (4, "app2", 0.1)] list2: [(1, "app3", 0.4), (2, "app5", 0.3), (3, "app2", 0.2), (4, "app6", 0.1)] and I want to compare how similar the app rankings are between two lists are...
Here is some data used for a chi square test: High Low B 62 10 Non-B 1366 97 chisq.test(VolumeData) Pearson's Chi-squared test with Yates' continuity correction data: VolumeData X-squared = 4.5124, df = 1, p-value = 0.03365 This may be trivial, but I got a statistically significant output....
State and prove the necessary and sufficient condition for an incomplete block design to be balanced A balanced incomplete block design (BIBD) is an incomplete block design in which b blocks have the same number k of plots each and every treatment is replicated r times in the design. Each treatment occurs at most on...
I've been diving deep into random forests and had a question about terminal nodes. I know in general when you reach the terminal node, or leaf, of a random forest, the assigned value for that leaf is the mode of the responses that end up there. For example, if you have 5 training examples end up in a terminal (based on...
I aim to determine the relation between Y (a dichotomous variable, Y/N) and multiple Xs (Continuous variables). In the following charts, X axis represents the binned value of an X, while Y axis represents the frequency of positive cases. The average frequency of positives is ~11%. enter image description here You may ...
I have two categorical variables X and Y that each are multi-label e.g. each x and y is a set of labels say $x \subseteq lbls_1$ and $y \subseteq lbls_2$. I want to get a measure of the correlation between the two variables. I know that Cramér's V can be used to compute the correlation between two categorical variables...
I have ran a series of experiments on a theoretical system. For a relatively small number of runs (~30) the data is normally distributed, but for longer runs (~200), a tail develops on the right... trying to think what other type of distribution this might be and whether there is a test in MATLAB?
I have been trying to reconcile R coefficients with actual coefficients for simulated data which follows the equation: $$ y = \alpha + \beta \cdot f(x) + \epsilon $$ where $\alpha$ is intercept and $\beta$ is the slope value. When I fit the GAM model in R using gam(y~s(x), data = data, method = "REML") from mgcv packag...
According to Eagle and Granger (1987), if I have 2 time series y1 and y2, we can test their cointegration with the p-value of an ADF stationarity test performed on the OLS residual. Though, when running statmodels coint function and doing the ADF on OLS residual, I end up with 2 different p-values. Here is an example :...
We have a series of binomial distributions, each with separate and distinct chance of success k. For some small subset of these distributions we have an absolute measure of k from the full population. We also have a process which can look at individual trials of the binomial distributions and estimate whether they succ...
Good morning, I have two groups of patients (treated / untreated) and I want to compute (in R) the hazard ratio of using the treatment on the occurence of an event. The event is an eye pathology relapse that can occur in one or both eyes of the patient. The treatment is systemic (not eye-specific). Is it correct to us...
I've searched for an answer to this, and read a number of scientific articles on the subject, but I can't find a practical explanation of how Dropout actually drops nodes in an algorithm. I've read that Dropout zeros out the activation function for particular nodes, that makes sense in the forward pass. But how does th...
I am modeling a process where events happen every X days with X following a gamma distribution. I already have a model for that which works relatively well. The issue now, is that the day of the week also has an effect on X, and so, in order to improve the model, I would like to use a probability distribution like p(x)...
I am struggling to derive the following identities: $$ \mathbb{E}[\log Z]=2\log(\mathbb{E}[Z])-\frac12\log(\mathbb{E}[Z^2]) $$ $$ \mathrm{Var}[\log Z]=\log(\mathbb{E}[Z^2])-2\log(\mathbb{E}[Z]) $$ where $Z$ is a random variable. These are equations (B6) and (B7) in this paper.
I am working on modeling the joint distribution of given multivariate data. I can fit some parametric distributions on the data and evaluate the fitted models by LogLiklihood and AIC values. However, I am not sure how to evaluate the KDE-based fitting of the data compared to the parametric fit. How can I evaluate the A...
I'm trying to understand the Dropout algorithm. In this paper, the authors say that the nodes are randomly switched off with probability $p$ for each "Training Example". Does this literally mean that every row in your dataset has a different dropout layout? Or, can "Training Example" mean a training batch?
I'm working for the first time on my own with a convolutional neural network, and I'm kind of stuck with the same results since the very beginning. My model is built with Pytorch and it has the following structure: Convolutional layer 1 -> Convolutional layer 2 -> Convolutional layer 3 -> MLP (input-hidden-output) I'm ...
I try to understand the differences between the MP Neuron and the Perceptron. Is my understanding right that the MP Neuron mathematically only differences in the activation function. I.e. the MP Neuron only has the Threshold function as activation function and the Perceptron can have all kinds of activation function li...
I have a large dataframe data with following columns: date time orig new 2001-01-01 00:30:00 345 856 2001-01-01 00:32:43 4575 9261 2001-01-01 00:51:07 6453 2352 ... 2001-01-01 23:57:51 421 168 2001-01-02 00:06:14 5612 3462 ... 2001-01-31 23:49:11 144...
I want to calculate the posterior distribution of Pareto distribution with known parameter $X_m$ and unknown parameter $\theta$, with conjugate prior on $\theta$ the Gamma distribution: My effort is the following : $$f(y;\theta,X_m)=\theta X_m^{\theta} \frac{1}{y^{\theta+1}}$$ \begin{align*} f(y_1,y_2,\dots,y_n;\th...
I have a panel dataset and build a negative binomial regression model for it. Here I would like to test a total of three interactions. So, if I include all three moderations (thus also the independent variables) and the control variables in my model, I get significant P-values for the moderations. But if I have each m...
I am seeking some assistance in how to take into account difference in trials periods when calculating average rainfall. I am investigating the effect of rain on plant disease severity. My trials have been conducted in different years, and the length of the trial varied in different year. I have been asked to use avera...
Using a difference-in-differences design, what are the consequences of violating the Stable Unit Treatment Value Assumptions (SUTVA)? I ask this because, in my specific field of research (conflict and conflict management), succesful treatments are strongly recognized as geographically "contagious". As a result, it seem...
I have conducted a confirmatory factor analysis in lavaan (in the context of a group comparison). Moving on to structural equation modelling I realised that my hypothesized structural model is identical to the measurement model, i.e. it has the same (good) fit indices and apart from the structural aspects (see output b...
We have a study setup for testing a new learning treatment, which basically looks like this: We have 4 tracks (same university course taught by different lecturers). In two of these tracks, the lecturers follow a new procedure (use of a digital learning enviroment), while in the other two, the lecturers teach as usual...
I have an R lecture script infront of me, where we are using logistic regression to try to predict the probability that an observation belongs to the target class (e.g. y_i = 1) or not (e.g. y_i = 0). Hence Y is given as a vector of 0's and 1's. Before running the regression our Prof. turns Y into a factor, but I don't...
I got a fomula $$N(y;cx,R)N(x;\bar{x},\Sigma)=N(y;c\bar{x},S)N(x;g,F)$$ where: \begin{align}S&=c\Sigma c^T+R\\g &=\bar{x}+\Sigma c^Ts^{-1}(y-c\bar{x})\\F &= \Sigma - \Sigma c^T s^{-1} c \Sigma\end{align} I want to know how to derive these fomula. --update-- I am sorry for ambiguous question. $N(y;cx,R)N(x;\bar{x},\Si...
I have two independent dataframes: Observation of animal frequencies in a site: Each row represents a site, where the animal frequencies (response variables?) sum up to 100 and the other variables (predictors?) are factors. Animal 1 Animal 2 Animal_n Altitude Region Geography_Type Chronology Site_Type 10 40 20 ...
Let's consider the family of transformations given by $$g_a(Y)=\begin{cases} \frac{e^{aY}-1}{a} & \text{ for } a\neq 0 \\ Y & \text{ for } a=0 \end{cases}$$ for $Y\in\mathbb{R}$. Analogous to the estimation of the Box-Cox parameter $\lambda$, the parameter $a\in\mathbb{R}$ can be estimated using a profile likelihood a...
I am attempting to classify text sequences into two sets of labels - class_1 = [A, B, C, D], class_2 = [X, Y, Z]. The model will be an instance of BertForSequenceClassification from Huggingface's Transformers. For each input sequence, the single model should predict one class from class_1 and one class from class_2, as...
I've trained a simple xgboost model, I didn't even do hyperparameters tuning: y=2-as.numeric(as.factor(Train_set[,1])) dtrain <- xgb.DMatrix(data = data.matrix(Train_set[,-1]), label= y) xgb_params <- list( booster = 'gbtree', eta = 0.5, max_depth = 5, gamma = 10, subsample = 0.75, colsample_bytree = 0.8, ...
I need to calculate $\operatorname{Cov}(X_0, w_0)$ where $X_t$ is an ARMA(1,1) process given by $$X_t = a_1X_{t-1} + w_t + b_1w_{t-1}, \quad w_t\sim\mathcal{N}(0, \sigma^2) \text{ independently}.$$ So far I have calculated $\operatorname{Cov}(X_0, w_0)=\sigma^2$ which gives unexpected behavior so I suspect is wrong.
im struggling with a potential easy to solve Problem. I have a dataset with 100k series of coin throws with varying k (throws). For each series I want to compute the the probability for each discrete n-state of getting head (sic!). E.g. 4 throws with the probabilities of c(.25,.5,.25,.75) to throw head. No I would like...
I have a daily set of observations (Jacard similarity matrix) that I want to embed in a much lower dimensional space. Thus I run PCA or SVD for each day and plot the projection on the top 2 dimensions (they usually explain ~90% of variance, but this is beyond the point). My problem is that when I animate the embedding,...
In doing a subset test of $H_0: \frac{d_1}{a_1} = ... = \frac{d_{10}}{a_{10}}$ vs $H_1: $ no restriction, where $d_i$'s are parameters and $a_i$'s are known constants Suppose a generalized likelihood ratio test is to be done, I have computed the statistic $-2\log\Lambda$ as some function of $X=(X_1, ..., X_n)$ denoted ...
Suppose I have a time series. Let's say it is of the number of sales in a shop. Suppose I am looking to make two models - model 1 which predicts future values by weekly time steps (total sales per week, i.e. 1-7 days from now, then 8-14 days from now, then 15-21, etc.) and model 2 which predicts future values by monthl...
I would like to see if there is an influence of the age variable on different medical indicators. To find out I have extracted 60 individuals from a large dataset, each of them have a different progressive age from 20 to 80 years. So for example these are my data: subject age 1 20 2 21 3 22 .. .. 59 79 ...
I have a process that is currently being effectively modelled by a Poisson Binomial distribution (wiki link). We have access to all of the constituent probability values of the independent trials; however, the number of trials can be large (500-1000+). There are also many processes modelled in this way, so imagine maki...
I'm attempting to create a machine learning model that predicts some real-valued data points. If I was using a straight regression approach (that is, one where the output is a real-valued number), I would know how to visualize it. For example, I could use a scatter plot of predictions versus known. Or I could take the ...
I stumbled across this example on scikit-learn (1.2.0), where the silhouette score alongside some other metrics is computed for DBSCAN cluster assignments. These assignments include some Noise assignments. from sklearn.cluster import DBSCAN from sklearn.datasets import make_blobs from sklearn.metrics import silhouette_...
I am working on a paper on smoking and depression in a sample of approximately n=2.000 subjects, and for that, I use longitudinal data (5 waves, 2 years between each wave). For a part of the paper, I want to analyse determinants of smoking in those with depression (both depression and smoking are time-varying variables...
I have a large set of aerial images with herds of elephants in it. The number of elephants in a single image can range from ~ 20 elephants to 1. I have created a dataset of ~ 2,000 png image files which lists the image_filename and the number of elephants in it (objects). Here's an example of the first few rows > df <-...
For my dissertation, I have a small and imbalanced dataset. It is made up of 190 cases, and the minority class (which I am most interested in detecting) is only 40 cases. Since this is an inferential/exploratory analysis, and will not be deployed in production, is it okay to do k-fold CV, and then take the mean F1 scor...
I am trying to wrap my head around linear mixed models for repeated measures with random effects. I'm choosing to conduct this type of model due to missing values in my dataset. I am interested in analyzing how differing amounts of antibiotics affect the growth of caterpillars. Approximately 24 larvae were organized in...
Let $X_t$ be a time series with $X_t = Y_t + Z_t$. At time $T$, $X_T$ "spikes"; that is to say, $X_{T-1}-X_T$ is over some critical threshold. I would like to assign some "contribution" to the spike to both $Y_T$ and $Z_T$, so that I can say something like "the spike is 90% driven by a corresponding spike in $Y_T$". Is...
I have two rates (# of incidences per # of visits): older - 2.33 newer - 1.33 Would it be appropriate to say that the rate was reduced by 43 percent ((1.33/2.33)-1)?
When we have the following two models: $$A: y=\tilde\beta_0+\tilde\beta_1x_1+u$$ $$B: y=\hat\beta_0+\hat \beta_1x_1+\hat\beta_2x_2+v$$ We know $$\tilde \beta_1=\hat\beta_1+\hat\beta_2\tilde \delta_1$$ where $\delta_1$ is the slope coefficient of regressing $x_2$ on $x_1$. Similarly, I was wondering if there is a way to...
I have the following data: predictions = [8;8;8;5;4;3;2;1]; true_target = [1;1;1;0;0;0;0;0]; When I compute the area under the precision recall curve using Matlab ([X,Y,T,AUPR] = perfcurve(true_target,prediction,1,'XCrit','tpr','YCrit','ppv')), I get a value of 0. The precision at different thresholds are [NaN;1;0.75;...
For sample size large enough, we know that the Maximum likelihood estimator (MLE) is asymptotic efficient. So when we have two classical methods (MLE and method of moment estimators) for inference of Normal distribution (or Uniform distribution on $[0,\theta]$ with unknown $\theta$), we prefer to use the MLE but not me...
I want to use 20 years of estimated precipitation data (maybe from CHELSA or CHIRPS datasets) to look at what the expected amount of precipitation is for different 30-day periods. The main purpose of this would be to identify month-long periods that are dryer than usual. If the rainfall data were normally distributed, ...
I wrote a simple code that creates a neural network with two dense layers and then trains it. In this code, the initial coefficients of each layer are fixed. Why do the answers change every time? (In situations where layers such as dropout are not used and the initial coefficients are also fixed) ``` import numpy as np...
I am working on a meta-analysis of travel impact measures where I have the total measurements and the specific amount of increase or decrease. In each study, I have multiple scenarios for the measurement. How do I perform a meta-analysis in this situation? For reference I will provide a sample dataset here: Study T...
Suppose that we have a log-likelihood function of five parameters and an observed data sample $y=[y_1,\ldots,y_N]$: $$\mathcal{l}(\beta_1, \beta_2, \beta_3, \beta_4, \beta_5;\;y) =\log f_Y(y;\;\beta_1, \beta_2, \beta_3, \beta_4, \beta_5)$$ where $f_Y$ is a proper density function. In my setup, $\beta_1\beta_2-\beta_3\b...
I want to find a metric that can quantify target value homogeneity across feature distributions. Without any background knowledge, it is hard to describe exactly what I want. Therefore, I provide an example for intuition. In the following scatter plots, x-axis and y-axis are two reduced dimensions of the original feat...
Questions : Say I have 1000 points, that are distributed in a $[0,1]\times[0,1]$ square. It is not uniformly distributed. For example I might have "clusters" of points within the square, and conversely, there may be some empty patches of space within the square. I want to get a measure of uniformness in the distributio...
I am working with twin data with my exposure variable being inflammatory marker level (continuous) and outcome being disease status (binary). In order to account for twin relatedness, I was trying to use a mixed effects logistic regression similar to: glmer(disease ~ x+(1|Family_No) in the lme4 package. But I have run ...
I'm looking for an information criterion metric that effectively penalizes the number of parameters ($k$) in cases where we have huge sample sizes. In my particular case my sample size is $\approx80,000.$ I happen to know that the ground truth model has $k=2$ parameters. But if I use Bayesian information Criterion it w...
I have two triangular 2D matrices and want to determine if their contents are statistically different. Let's say I have a collection of 5 different species and two proteins from the 5 species. Let's call the first protein 'A' and second 'B'. I'm interested in testing if protein A is more or less similar across these sp...
I am reading the ISLR textbook (pg. 518-519, 12.4) and having trouble understanding why K-means clustering never increases. I can understand it conceptually but I don't understand the mathematical justification for it. For example, the objective function for K-means clustering is: $$ \operatorname{minimize}_{C_{1},...,...
I have the following GLMM model (using R with the lme4 package): resp ~ condition * level + (1 | subject) I have a clear difference between levels and I would like to see now if there is a difference between subjects within levels. Is this possible? If so, after filtering by group (df %>% filter(group == level1)) woul...
The joint distribution of a undirected graph can be factorized as a product of potential functions over the maximal cliques of an undirected graph. $$ p(\mathsf{x} \mid \theta) = \frac {1} {Z(\theta)} \prod_C \psi_C (\mathsf{x_C} \mid \theta_C) $$ $\mathsf{x_C}$ is a set of variables in the clique $C$ $Z$ normalizes t...
The book says: for the standard linear regression model, we assume: \begin{equation} y_i= \beta_0 + \beta_1 x_i + \epsilon_i \end{equation} where $E[\epsilon_i]=0$ and $Var[\epsilon_i]=\sigma^2$. Homoskedasticity implies that the errors are independent of the covariates. For constructing confidence interval and hypothe...
Objective: Estimate the mechanical tension of a cable using the velocity of the waves travelling along it. Experimental setup: I have a cable in tension equipped with accelerometers. I measure a strong cross-correlation between the sensors which corresponds to waves propagating along the cable. Tension measurement: I h...
Let's say A is a normal distribution A = N(mean = 0, SD = 1). Let's say B = A + N(0, 0.5), such that A and B are dependent. What is P(A>1, B>1) (the probability of seeing a point whose A and B values are both >1)? Apologies if my notation isn't quite right, my pure math background isn't that strong. I'm currently tryin...
If a customer arrives according to a Possion process with rate $\lambda$, how can I show that the time interval $X$ taken to receive $k$ customers is an Erlang-$k$ random variable with parameters $n$ and $\lambda$?
Many software implementations of locally weighted scatterplot smoothing (LOWESS), such as those in Python and R, require a frac parameter as an input. I am confused as to how frac is mathematically related to the term 'window size'. According to Statsmodels' documentation, The algorithm works by estimating the smooth ...