instruction
stringlengths
9
38.7k
Introduction: Archaeological research often involves drawing conclusions about past societies and cultures based on a limited number of artifacts or findings. In some cases, such as the study of synagogues in the Levant, the number of findings may be significantly smaller than the number that existed during the period ...
I would like to test the difference between two classification outcomes for statistical significance using McNemar's test, but I am unsure how to best account for multiple comparisons. The setting is as follows (see plot below): I have obtained two classification accuracies based on the same dataset (solid line vs. das...
I'm studying regression bootstrap procedures for my thesis, and have stumbled something which I find difficult to understand. Consider the standard normal linear model $$ Y = \beta x + \epsilon \,, \qquad \epsilon \sim \mathcal{N}(0, \sigma^2) \,, $$ and suppose we want to simulate the distribution of the response $Y_+...
In this answer @ttnphns writes Both eigenvectors and loadings are similar in respect that they serve regressional coefficients in predicting the variables by the components (not vice versa!) , and in a footnote adds that Since eigenvector matrix in PCA is orthonormal and its inverse is its transpose, we may say that...
I'm studying economics and learning statistical topics only related to my fields. In my textbook I read this formula for likelihood function, and I can't follow the rule. $Y_t | Y_{t-1},Y_{t-2},\dots,Y_{-p+1} \sim N(0,\sum)$ $f(Y_t | Y_{t-1},Y_{t-2},\dots,Y_{-p+1},\theta)=(2\pi)^{-n/2} \sum^{-1/2}exp[(-1/2)(Y_t)'\sum^{...
I am reading T. Chen, C. Guestrin, "XGBoost: A Scalable Tree Boosting System", 2016 (arXiv), which is seemingly full of typos. They propose the so-called "approximate algorithm" (Algorithm 2 below) and justify it as follows (section 3.2): However, it is impossible to efficiently do so [Algorithm 1] when the data does...
I am following the derivation of Variational Bayes approach in David Blei's lecture notes, particularly equations (13 - 16). In particular, the line: $$ = E_q [\ \log_2 q(Z) ]\ - E_q \left[\ \log_2 \dfrac{p(Z, x)}{p(x)} \right]\ $$ $$ = E_q [\ \log_2 q(Z) ]\ - E_q [\ \log_2 p(Z, x) ]\ +\log_2 p(x) $$ In particular, ...
If we draw independent samples $x_0\sim N(0,\sigma^2), x_i \sim N(\mu_i,\sigma^2)$ for $i \in \{1, 2, \cdots, N-1\}$, what is the probability that $|x_0|$ is the smallest among all samples $|x_i|$'s? Under what condition is $|x_0|$ the smallest almost surely? I was trying to calculate $\mathbb{P}[|x_0|<|x_i|]$ for some...
I am trying to understand how to incorporate noisy gradient information in Gauss Process Regression using a Bayesian framework and I need your advice. I am following the following approach: Let $\mathcal{D} = (x,y)_i$ be noisy data and let $\mathcal{D}_g = (x_g,y')_j$ be noisy gradient observations. The joint prior sho...
This is my data. It has no gaps in survival or the used predictor - for the sake simplicity in this example. I want to see, if multiply generated the same dataset will give - after pooling - the same results as the raw approach. Of course my REAL data will have some gaps. The gaps will occur in a few variables, used to...
I'm implementing Newton's method for a simple logistic regression model but I keep getting very large values for the inverse of the Hessian matrix. I am using the standard formulas found in books... I'm pasting a working example: import numpy as np from math import log, exp obs_x = np.array([0, 0, 0, 0.1, 0.1, 0.3, 0....
I am interest in the constrained L1 Lasso problem: $$\min_{\beta\in \mathbb{R}^p:\sum_{i\in[p]}|\beta_i|=1} \|X\beta -s\|^2, (1)$$ for design matrix $X\in \mathbb{R}^{n \times p}$ and target $s\in \mathbb{R}^n$. In particular, I am interested in the setting where there are more features than examples, i.e. $p>n$ (and ...
For $(X_1,X_2)$ ~ $Normal(\mu, \Sigma)$: $$E(X_2|X_1)=\mu_2+\rho*\sigma_2\frac{X_1-\mu_1}{\sigma_1}$$ I am trying to derive the $E(Z_2|Z_1)$ for $(Z_1,Z_2)$~$LogNormal(\mu, \Sigma)$. I guess I could calculate $E(Z_2|Z_1)$ as follows: $$E(Z_2|Z_1)=\int\frac{f_{Z_1,Z_2}}{f_{Z_1}}*Z_2*dZ_2$$ but this seems too complicated...
This question has been asked before but I'd like to come back to it because I point a precise issue out. Suppose we want to estimate a function $f\left( x \right)$ from data $D = \left( {\left( {{x_1},{y_1}} \right),...,\left( {{x_n},{y_n}} \right)} \right)$ with ${y_i} = f\left( {{x_i}} \right) + {\xi _i}$, ${\xi _i}\...
Currently, I am working on a research project that involves forecasting electricity consumption using data mining. In my analysis, I have detected the change point for time series using the changepoint package for my data sets using the "AMOC", PELT," and "BinSeg" methods. For each method, I have used var, mean, and me...
In decision theory, given a family of distributions $(P_{\theta})_{\theta \in \Theta}$ on the data space $\mathcal{X}$, the risk $R_L(\theta, \delta)$ of an estimator $\delta$ for a given loss function $L(\theta, d)$ is given by $$R_L(\theta, \delta) = \int_{\mathcal{X}} L(\theta, \delta(x)) \, dP_{\theta}(x)$$ I have ...
In a seminal article in virology ('Sur l’unité lytique du bactériophage' Comptes rendus des séances de la Societé de biologie et de ses filiales, 1939, 130, pp. 904-907) the Nobel prize winner Salvador Luria applied the Poisson distribution to demonstrate that one bacteriophage particle was sufficient to lyse a culture...
I am running models, and I am learning how to use LIME to explain the models. I trained a random forest, on data that has 988 rows and 5000 columns. However, I am getting an error which says Error: All permutations have no similarity to the original observation. Try setting bin_continuous to TRUE and/or increase kernel...
I am studying Elliptically Symmetric Distributions and someone recommended me Symmetric Multivariate and Related Distributions by Fang (1990), which is the book I am reading for that purpose. I know that if $X\sim N(\mu,\sigma^2)$, then $|X|$ follows a folded normal distribution. So, I wonder if there exists some gener...
I have a hidden Markov model. $X_n = e^{-b\times dt}\times X_{n-1} + \sigma_v \times V_v$ $Y_n = X_n + \sigma_w \times V_w$ where $b$ is the model parameter, $\sigma_w$ is the standard deviation following Gaussian noise. How to find the conditional probability of $b$ given $X$ and $Y$ from $n \in {1,2,\dots, k}$? I thi...
I need to run an analysis in spss, please could you advise me on that matter? I gave my examples, please correct me.. three groups: control, body positivity, body neutrality, measure: self esteem, body image, social comparison hypotheses: H1: Participants who view body neutrality messaging will have higher scores ...
Suppose we have a one-sample binomial proportions problem with a small number of trials (say 5–10 trials). I want to conduct inference and come up with a p-value for testing $p\neq p_0$ for some $p_0$ prescribed proportion. What are some ways to do this? Is there a Fisher's Exact test analogue for one-sample? What abou...
Suppose our dependent variable Y is TRUE vs FALSE, and our independent variable X is GREEN, YELLOW, and RED. We performed a logistic regression of Y~X. I wonder if it is possible and how to use the trained logistic regression to answer the following question: What is the odds ratio (and p-value) of TRUE vs FALSE for s...
I am looking at a fertility dataset and have the following variables: kids is 1 if a mom had more than 2 kids, 0 otherwise. multi2nd is 1 if the 2nd and 3rd children are twins, 0 otherwise. age is the age of mom. agebirth is the age of mom at time of the birth of her first child. blackm is 1 if mom is black, 0 otherwi...
If I am comparing where there are any significant differences in the number of damaged apples between apple types, what kind of statistical test should I use? There are 5 types of apples with different sample sizes. Apple Type Number of observed apples Number of damaged apples Granny Smith 2500 233 Fuji 2000 ...
The Capital Asset Pricing model proposes that, $$ R_i=R_f+\beta(R_m-R_f) $$ where $R_i$ is the return of the i-th asset, $R_f$ is the risk-free rate and $R_m$ is the Market returns. $\beta$ is generally estimated using simple linear regression, but the covariates are random variables which violates the assumptions of r...
Disclaimer: I am not a statistician, but a computer scientist working a lot with probability distributions. I am asking this question to help me understand how statistical frameworks and terminology can be applied formally to the reasoning below. Consider the following example, e.g. borrowed from a tweet of E. Yudkowsk...
I have a question about the implementation of Cox Time Varying Regression model, that I need to perform to understand the impact of co-variates on my survival prediction. I found an example here (https://lifelines.readthedocs.io/en/latest/Time%20varying%20survival%20regression.html) but I still have a doubt. My dataset...
I have a question regarding 2SLS and interaction-terms between the predicted endogenous variable and a set of exogenous variables (second stage). I want to calculate the effect of an endogenous variable (X) on the dependent variable (Y) in interaction with a set of exogenous variables (X2 + X3 + X4). Normally, without ...
I am working on a project where I am evaluating different machine learning models to be used as scoring functions during in-silico docking. It is a regression problem where the 3D structure data of a protein bound to a ligand is used to predict the binding affinity of the complex. I have a training set of ~3600 example...
The soup analogy is, You only need a single spoon to sample the soup, provided it is well stirred. It has been used several times here Sampling distributions of sample means and What is your favorite layman's explanation for a difficult statistical concept?. It is also referenced on other websites, for example Soup ...
I am conducting a retrospective cohort study to determine the association between receiving medicine X with death during the first 100 days of therapy for patients with leukemia, from 2010-2020. Starting in 2015, all patients began receiving medicine X on Day 10 (t=10) of therapy to prevent infection, whereas nobody re...
I am calculating elasticities per income quintiles. I have 10,000 observations of elasticities calculated for each quintile, so a dataset of 5*10,000. I would like to test whether the elasticities are stat. different per income-group. How should I do this? Can I calculate the mean over all samples and use the Wald-test...
For SPSS is rating knowledge of a nutrient on a scale of 1-10 ordinal or continuous scale variable ? In my questionnaire I stated that 1=poor knowledge of the nutrient while 10=excellent knowledge of the nutrient
Let $\mathbf{X}=\{X_1, X_2, \ldots, X_n\}\sim\mathcal{N}(\mu, \sigma^2)$ and $\mu$ is known. Does $\frac{\sigma^2_{\mathbf{MLE}}-\sigma^2}{\mathbf{se}(\sigma_{\mathbf{MLE}}^2)}$ is asymptotically normal and why? I know $$\sigma_{\mathbf{MLE}}^2=\frac{1}{n}\sum_{i=1}^{n}\left[X_i-\mu\right]^2$$ and $\frac{n\sigma_{\mat...
In reviewing my notes about making causal inferences under the selection on the observables identification strategy, I reviewed some pieces that make critiques against contemporary strategies in observational settings that use regression adjustment. I'll use Samii 2016 as an example although the arguments made in this ...
Suppose I am performing a propensity score matched analysis using the MatchIt package in R, following the example reported here: https://kosukeimai.github.io/MatchIt/articles/estimating-effects.html library("MatchIt") #Create dataset 'd' as reported at the bottom of the example---- gen_X <- function(n) { X <- matrix(...
I wrote the following code in Python. First I generate some data: # generate data x1 = np.random.normal(10, 5, 1000) x2 = np.random.normal(20, 5, 1000) error = np.random.normal(0, 1, 1000) y = np.exp(3*x1 + 6*x2) + error X = np.stack((x1,x2)).T Then I pre-allocate some variables: weights = np.ones(np.shape(X)[1]) lear...
I'm performing hyperparameter tuning for a classifier. After I finish, I'm updating the hyperparameter search space and re-tuning the hyperparameters again. I repeat this process a few times. In addition to the validation set used for hyperparameter optimization, I use a separate test set for final evaluation. Is it a ...
I am currently reading about stochastic processes and Brownian Motion. When books have notation such as $E[X_t] = 0$ and $Var[X_t] = \sqrt{t}$ this is considered over sample paths. However, when we consider the distribution of the increment $X_t - X_s \sim \mathcal{N}(0,|t-s|)$ what random variable is this exactly? Is ...
I am facing a multiclass classification problem where I have 4 classes and one of them dominates over the others. I use a KNN classification model and the majority of the instances are being classified as the majority class. I used the weights = 'distance' parameter and it did improve, but not all what I expected. I kn...
We have a shuffled, standard 52 card deck with 4 Aces and 4 twos. I am confused about the probability of seeing an ace before seeing a two. By symmetry, it seems obvious that the probability should be $0.5$, since the probability of seeing one before the other is equal. But when I think of it this way: given the order ...
I did time-dependent covariate analyses with cox regression in R. But I wonder if the interpretation is the same as for a cox model with a fixed covariate? Context: in my analysis the physical activity score index was analyzed 5 months after their lung cancer remission period and then 5 more months after that, i.e. 10 ...
Question: Is there a known, exact expression for the Bayes factor between two multivariate normal hypotheses? Let $H_1$ and $H_2$ be two subsets of $R^d$ with normal priors $\pi(\mu|H_j)$. The sets $H_j$ represent two hypotheses for the unknown mean $\mu$. The Bayes factor is defined as $BF=P(X|H_1)/P(X|H_2)$, where $X...
I know that P(Y=y|do(X=x)) is different from P(Y=y|X=x) in that the former is an interventional probability where the intervention is applied to the entire population, whereas the latter is a straightforward conditional probability where we simply condition on X taking on value x. But how would we read something like P...
I have ran the below linear regression model and using the performance package in R I however checked whether the distribution of the residuals is normal. The performance package suggests I should be using a Cauchy distribution for the errors. In a search of stats.stackexchange and Google, it isn't clear how to do this...
To visualize p-values or confidence intervals, the t-distribution is sometimes rescaled using the sample standard deviation and then centered at a certain value. To be more specific, consider drawing a random sample of size $n$ from a normal distribution with mean $\mu$. The random variables $M$ and $S$ denote the samp...
I have a dataset with around 1M data. But, in real-life it should be more. From the dataset after first step processing for specific task, I got 50K data. Then I processed it again for a specific attribute value (continuous), got around 7K data successful. I was thinking of one-sample t-test considering population is u...
I have been handed data that is interval censored where left censoring is limit of detection and right censoring is saturation of the assay. How do I estimate the means and mean standard errors of this data?
Is there a known symmetric distribution with finite 1st moment but undefined or infinite for moments>1?
Say you're fitting a generalized linear model where the response variable is weight and there are several factors: height, sex, vegetarian, country where the person lives, etc. Now say you expect there to be an interaction between height and country. Does the way you account for this in the model depend on how many lev...
I recently read a paper and the authors run a survey experiment that had 4 groups, including a control group. The author writes the following: "The treatment about better responding to economic crises has no systematic effect on exchange rate policy preferences. In addition, the estimated effect from T1 is larger than ...
I was wondering how you would find the Yule-Walker equations for an AR(2) (or, really, any AR(P)) stationary time-series model, where there is a "missing" term. For example: $$ X_t - \phi\frac{1}{4}X_{t-2} = \epsilon_t $$ Where $\epsilon_t \sim WN(0,\sigma^2)$.The "missing" term is the $X_{t-1}$. Writing the Yule-Walke...
Cross-posting from stackoverflow I am working with a dataset having the following structure (download data here). The variable resp is a physiological response measured once for every subject during the study. In the study, each subject was observed for 5 days at 10 time points. The variables vala, valb, valc, vald ar...
A comment to this question suggests that the OLS estimate of linear model parameters is unbiased, even when the error term is Cauchy. Given that Cauchy distributions lack an expected value, I am skeptical that the parameter estimates have an expected value (though I am on board with their expected value being the true ...
I am running a logistic regression. Treatment is a factor with 3 levels. I am assuming that intercept is one of these 3 levels (negative control in this case). Is there a reason the equation is splitting the predictor variable like this? Call: glm(formula = propgfp ~ treatment, family = quasibinomial, data = frass4glm)...
I have a Markov kernel $Q$ from which I would like to generate proposals for the Metropolis-Hastings algorithm. The problem is: When the proposal is accepted, the "internal state" of $Q$ changes. This means that if proposals $y_1,\ldots,y_n$ are accepted, the internal state of $Q$ depends on $y_1,\ldots,y_n$. I know, t...
I have fitted a Bayesian GARCH(1,1) model with Student $t$ innovations to some time series data, $X_1,...,X_n$ and now want to estimate Value-at-Risk (VaR) (i.e., 5% quantiles) at each times $t=1,,...,n$. To do so, I'm using bayesGARCH in R, which returns an mcmc object from which I can obtain samples from the posterio...
I have allele frequencies from two independent studies Study Number Sample Allele 1 Freq Allele 2 Freq Allele 3 Freq A 20 .45 .475 .075 B 34 .72 .28 NA The weighted average of each allele frequency is as follows Allele 1 Freq avg: .62 Allele 2 Freq avg: .355 Allele 3 Freq avg: .075 The estimated diplo...
Suppose I would like to develop a machine learning model from 10 datasets to predict a clinical diagnosis (diagnosed or not). After checking the data, all of the outcome and feature data are similarly distributed in the datasets and it is reasonable to combine these datasets. However, they are discrepant one one featur...
Suppose a dataset as follows: data <- data.frame(X = c(1.2, 1.5, 1.7, 1.8, 2.0, 2.2, 2.3, 2.5), Y = c(3.2, 3.5, 3.7, 3.8, 4.0, 4.2, 4.3, 4.5), technique = factor(rep(c("A", "B"), each = 4)), county = factor(rep(1:4, times = 2))) data X Y technique count...
For example: poisson.test(x = 170,T = 70,r = 3,alternative = "two.sided",conf.level = .95) Exact Poisson test data: 170 time base: 70 number of events = 170, time base = 70, p-value = 0.005157 alternative hypothesis: true event rate is not equal to 3 95 percent confidence interval: 2.077216 2.822335 sample esti...
I am trying to find the best US state using 25 columns of normalized data (best = 1, worst = 0) such as crime rate, GDP, house prices, and others. This results in a 50x25 Excel table. Afterward, each state is given a score by adding the products of each variable with its respective relative weight. Here's a simplified ...
after obtaining the posterior draws(N=1000) for parameters for a bayesian VAR Model. how do we select the single parameter among 1000 draws that best depicts the posterior distribution
Suppose that I want to evaluate the following integral: $$A = \int_0^1 \log\left(\theta^s(1-\theta)^{n-s}\right)p(\theta)d\theta,$$ where $p(\theta)\equiv$ Beta$(ws+1, w(n-s)+1)$ and $n$, $w$, and $s$ are known constants. How would I go about evaluating this integral analytically?
A machine model is tested in the factory to check the acceleration coefficient. The experiment selects n machines of this model and measures the distance traveled by the machine in 38 seconds. It is assumed that path measurement errors are independently equally distributed and have a distribution of 1/2 - exp(1). Const...
In [1], Ogle & Barber discuss a method for ensuring identifiability of certain Bayesian multilevel regression models; they call this method "post-sweeping". I have a couple of related questions stemming from this method/approaches like it. Setup Consider the varying-intercepts model, $$ y_i \sim N(\beta_0 + \beta_{g(i)...
Let $X_1,...,X_n$ a i.i.d from a population with distribution $U[0,\theta]$, i.e., $f_{X_i}(x)=\frac{1}{\theta}g_{[0,\theta]}(x)$, for $i=1, \ldots, n$ where \begin{align} g_{[0,\theta]}(x) = \begin{cases} 1 & x \in [0, \theta], \\ 0 & x \notin [0, \theta]. \end{cases} \end{align} How to prove that $\hat\theta = \max\...
I'm working on a time-dependent dataset, where basically I have two different populations and we're building Markov chains to describe their behaviors. What I'm trying to do is compare the transition matrices associated to the two populations, and decide whether the transition matrices are really different, or whether ...
I am checking the conditions for hypothesis testing a Pearson correlation as significant or not, and also checking the residuals normality conditions for OLS. Why are the following methods giving different results (why are the variables not bivariate normal but the residuals of an OLS model are normal?)? Also, why does...
Suppose I have pre-treatment samples and post-treatment samples for a group of patients. Let the treatment effect on each patient be the difference between the two sample means. Now I have a new treatment and I want to test whether this new treatment has the same treatment effect, i.e. does the sample mean difference f...
I'm using data (secondary analysis) to conduct an exploratory analysis. I have a sample size of $n = 67$, and the exploratory analysis includes two independent variables and four dependent variables. I am assessing how each of the two independent variables correlates (partial correlations) with the four dependent varia...
I am trying to compare the accuracy of a polynomial model and a Random forest regression model in predicting a variable Y but also the integral of this variable , With the polynomial model, it is clear how to compute its integral, however, I am wondering if applying a numerical integration over the prediction range wil...
It is known that a linear function compounded with a squared loss is convex, so one can efficiently find the optimal solution when performing linear regression. Specifically, given a data point $(x,y)$ we have the loss function $$f(w)=(w^Tx-y)^2,$$ which is convex in $w$. I'm wondering if there exist other functions th...
Let's look at an example: We want to know if our new jogging shirt reduces the amount of sweat produced by runners. Ten factory employees in Bangkok, Thailand are recruited to try out the prototype by jogging for 30 minutes and recording the amount of sweat on their foreheads. Ten office employees from Vancouver, Cana...
Let $X_1 = U(0,1)$ and $X_2 = U(0,1)$. $X_1$ and $X_2$ are independent. Then $f(x_{1}, x_{2})=1, {0}\le{x_1}\le{1}, {0}\le{x_2}\le{1}$. Let $Y_1 = \arctan(X_{2}/X_{1})$, $Y_2 = X_2$. I need to find the density function $g(y_1)$. Here's what I've done so far. $X_{2}/X_{1} = \tan(Y_{1})$ $X_{1} = X_{2} / \tan(Y_{1}) = X_...
Wooldridge Introductory Econometrics: A Modern Approach (2018), pages 561 and 572, gives the following definitions: Latent variable model (LVM): $$ y^*=\beta_0+\mathbf{x} \boldsymbol{\beta}+e, y=1\left[y^*>0\right] $$ where the indicator function takes the value 1 and if the event in the brackets is true and 0 otherwis...
Suppose that $X_1, X_2, X_3$ are iid random variables. I have seen this fact many times that $$\mathbb{P}(X_1<X_2<X_3)=\frac{1}{6}$$ but I want to know that why every permutation of $X_1, X_2, X_3$ is equally likely and also is this true for both discrete and continuous case and can we generalize this fact for all $n \...
I have a model with a one predictor, one mediator and one outcome. The following are the coefficients i got for my mediation analysis, but I can't understand how to make sense of them. Could someone please help explain what must be going on and how I can report these results. The indirect effect is significant (b = 0.0...
Is there a risk of overfitting when hyperparameter tuning a model using Optuna (or another hyperparameter tuning method ), with evaluation on a validation set and a large number of trials? While a smaller number of trials may not find the best combination of parameters, could increasing the number of trials lead to the...
Consider $S_n = \sum_{i = 1}^n b_{i,n} X_{i,n}$ where $X_{i,n}$ are random variable neither independent neither identically distribution and $b_{i,n}$ are weights satisfying the Lindeberg condition. I managed to prove that if $E[|X_{i,n}|^s]< \infty$ for all integers $s$, then $S_n$ converges to a gaussian random varia...
I have several time séries couples from which I compute cointegration p-value, then sort these couple by that p-value, starting from the lowest (for further VECM analysis on the top 100). All couples have not the same length : some asset start after others, all finish at the same time (now), leading to time series with...
I have run a Friedman's test in R and it has given me the following result: > pwc <- psheetv2 %>% + wilcox_test(score ~ time, paired = TRUE, p.adjust.method = "bonferroni") > pwc # A tibble: 3 × 9 .y. group1 group2 n1 n2 statistic p p.adj p.adj.signif * <chr> <chr> <chr> <int> <int> ...
I'm trying to analyse bullying experiences across three age groups. The DV is scored on a 5-point Likert, and the IV is categorical (ages 11, 13, and 15). Initially I ran an ANOVA to see if there was a significant difference in bullying experiences across three age groups. The results came back as non-significant with ...
I have built a generalised linear mixed effects model fitted to a gamma distribution. I am wanting to compare this experimental model to a nested null model to see whether it is a better fit for the data. Here is the experimental model for illustration: fpMod_gamma <- lme4::glmer(reactionTimes ~ Condition + typingStyle...
We have a manufacturing process in which the finished products have the following requirements: individual unit must have a weight within ± 10% of average weight (test with 10 random units). One of the in-process quality control test is: Take 10 units, determine their average weight (X) without measuring individual uni...
From what I've seen, it is common practice in Deep Reinforcement Learning to standardize certain data. By standardization, I refer to the process of subtracting the mean and dividing by the standard deviation. (Certain Reinforcement Learning projects refer to this as normalization, and I also encountered the term Z-sta...
I have around 33 variables, and 300 observations, although of some variables there are some missing data. I would like to obtain the best subset of variables which can separate the best 3 categories in a multidimensional space. I thought about applying some discriminant analysis, but as there is some missing data (I wo...
We have data $X_1, \dots, X_n$ which are i.i.d copies of $X$. Where we denote $\mathbb{E}[X] = \mu$, and $X$ has finite variance. We define the truncated sample mean: $\begin{align} \hat{\mu}^{\tau} := \frac{1}{n} \sum_{i =1}^n \psi_{\tau}(X_i) \end{align}$ Where the truncation operator is defined as: $\begin{align...
I am comparing calcium intake among 5 groups and want to test whether their knowledge of calcium is associated with a higher intake. I have asked 3 questions to assess knowledge e.g. do they know the RDA for calcium, do they know why we need calcium etc. Is a 3 way anova correct? The group sizes are unequal. Details I...
I am looking for an intuition on why ANOVA indicates that the difference between two variables is significant although I see that the variance within each variable is quite large. This is how the mean and error bars showing the standard deviation look like for the two variables: And the one-way ANOVA for the two sampl...
I am working on hourly-weather data. It contains four features: rain, wind speed, humidity, and temperature. Obviously, all of them are continuous values. The number of records is around 17000. Other than highly skewed precipitation (almost 90% are zero), all parameters are distributed normally. To cope with skewness, ...
I am modelling the occurrence of a species at 5 different sites on an hourly basis (presence/absence), based on a range of temporal predictors (e.g. time of the year, day/night cycle, tides ...). Covariates are indicated by x1, x2, ... in the code below. For information, I have ~70 000 data points. I am using a HGAM st...
I want to use self-normalized importance sampling methods to estimate $$\int_{1}^{\infty} \frac{x^2}{\sqrt{2\pi}}e^{\frac{-x^2}{2}} \,dx$$ I choose exponential distribution with rate $\lambda=1$ as my importance function which is $$f(x)=e^{-x}$$ The true value of the integration is about $0.400$ but I get 0.799. The f...
I have observed N (a_i, p_i) pairs each drawn from a different Bernoulli distribution. Here a_i are observed amplitudes and p_i are observed probabilities of success for the i^{th} draw. I would like to model the full likelihood distribution (and not just via the MLE) with a view to identifying which draws belong to th...
I have a dataset with destructive follow-up. That is, with a population starting at time 0, we are taking out a proportion at predetermined time points to see whether the event has occurred to them. The sampling is destructive, so we can't sample the same individuals repeatedly. In this case, we need to dissect a fish ...
I would like to determine CDF and PDF from quantiles that I have determined via quantile regression. I have read here in the forum (Find the PDF from quantiles) that it is possible to interpolate this via the integral of a B-spline The PDF should then be determined via a normal evaluation. Unfortunately I did not under...
I have a dataset consisting of time periods, at the end of each one the individual either develops a disease, or doesn't and is right-censored. I suspect that the rate of developing the disease is determined by a power function of another known variable, N, a an unknown power b, and an unknown multiplier a determined b...
Short version Can bootstrap be used to find disconnected confidence regions when MLE is not unique? Long version Let $\theta$ be a parameter and $P_\theta=\mathrm{Normal}(\theta, 1)$ be a distribution. In the frequentist approach to statistical inference one has access to the sample $X_1, \dotsc, X_n\sim P_\theta$ and...
Small area estimation (SAE) techniques combine information from household surveys with existing auxiliary information at population level to make inferences of certain indicators for population groups who represent disaggregations for which the survey was not designed. Most SAE methods, both direct and indirect (for mo...