instruction
stringlengths
9
38.7k
Suppose I have an AR(1) process of the form: $$y_t = \phi y_{t-1} + \epsilon_t$$ where $\epsilon_t$ is a white noise process with mean zero and variance $\sigma^2$. If $|\phi| < 1 $ , the model is called 'stable' and hence 'stationary' and I can solve it backward (i.e. backward iteration) to get : $y_t = \sum_{j=0}^{\i...
Suppose I have measurements for the expression-level of a "gene" from two groups of arbitrary (possibly different) sizes. Maybe one group is a control and the other treated. $x$ = <4.5, 5.6, 4.3, 6> and $y$ = <1.2, 3.2, 1> The data are log-transformed (say base 2) and I am interested in modeling the fold change. I do n...
Assuming I have that $Y_i\mid \mu$ is an iid ~ $N(\mu,\sigma^2)$, for $i \in (1,\dotsc,n)$ with $\sigma_i$ known and improper prior $\pi(\mu)=1$ for all $\mu$. i. How can I derive a formula for the MAP of $\mu$. ii. Given that, $n=3$, $Y_1=12$, $Y_2=10$, $Y_3=22$, $\sigma_1= \sigma_2=3$ and $\sigma_3=10$. Compute the M...
I have a discrete 1-D data set with a value range of 0-100. The underlying distribution is unknown --although we have enough data to fit a model-- to summarize it is a highly right-skewed data set, with a vast majority of values between 0-5. My goal is to detect spikes in this data set. Spikes such as [0, 0, 0, 20, 15,...
I came to know about Bootstrap validation approach for data poor settings. Currently, my problem is binary classification with 977 records and 6 features. class ratio is 77:23. Model is random forest As my dataset is small, I learnt that regular train, test split may not be a good approach and that's when I came to kno...
How do we decide on the optimum epsilon and min_samples to be specified given our data? Take this for example - Demo of DBSCAN clustering algorithm via https://scikit-learn.org/stable/auto_examples/cluster/plot_dbscan.html# db = DBSCAN(eps=0.3, min_samples=10).fit(X) According to https://www.kaggle.com/code/pnarerdoan...
I have difficulty grasping the difference between forward and reverse mode automatic differentiation. To understand this problem I have created a simple equation and broken this equation into small chunks and find partial derivatives of it. $$z = (x+y)(x-y)$$ $$a = x+y$$ $$b = x-y$$ $$z = a*b$$ for simplicity we are on...
The 2 results I got for bagging and random forest are shown below. It seems that calculating mean MSE from bootstrapping also result in a lower mean MSE for bagging as compared to random forest. Is bagging a better predictive model in this case? best_bag_model_all Call: randomForest(formula = Balance ~ ., data = bank...
I want to fit the following model using splines: \begin{align} Y(t) = \beta_0 + \beta_1t + \sum_{j=2}^{d} \beta_jB(t)_j \end{align} where $B_j$ are the basis functions. However, when I run the following code: fit <- lm(y ~ bs(t, df=5, intercept = FALSE), data = df) The output only contains a coefficient for $\beta_0...
I'm currently trying to estimate a VAR with 3 variables - consumption, investment and a credit spread. I have inspected the variables and run ADF tests to determine that they are in-fact trend-stationary rather than processes with a unit root. On running a Johansen test to check if they cointegrate, I find that the LR ...
h2o model metrics results report generated like this. ModelMetricsBinomial: xgboost ** Reported on test data. ** MSE: 0.2027733882478528 RMSE: 0.45030366226342505 LogLoss: 0.5890830298889025 Mean Per-Class Error: 0.3520671274857333 AUC: 0.7466180668626095 AUCPR: 0.7385051498737671 Gini: 0.4932361337252189 Confusion M...
I did visual binning process in spss and made three cutpoints like in this image: I did check off included I want to know the percentage range or value for each group. If I describe it in this way is it correct, The percentage values? Group 1/ equal or less than 25 Group 2/ 26-50 % Group 3/ 51-75 % Group 4/ 76%+ or ab...
If I change the training/test ratio from 90/10 to say 80/20 or 70/30, how does that affect the RSE and R2 metrics? I see changes in the results of the RSE and R2 when I implement the model, but I cannot grasp the underlying reasoning behind those. For a 90/10 split (Linear regression model on the Boston Housing Dataset...
If it is said that a trial prespecified one-sided overall type one error of 2.5%, and the trial was designed to assess superiority, so one sided tests were specified for the alternative hypothesis, critical regions, and P values. However, two-sided tests are reported. For example: two-sided P-value = 0.006 and another ...
I found this discussion: GEE: choosing proper working correlation structure Cite: Correlation structure in GEE, unlike mixed models, does not affect the marginal parameter estimates (which you are estimating with GEE). It does affect the standard error estimates though. This is independent of any link function. The li...
I am working on a binary classification using random forest with a dataset size of 977 records and 6 columns. class ratio is 77:23 (imbalanced dataset) Since, my dataset is small, I learnt that it is not advisable to split using regular train_test split of 70 and 30. So, I was thinking to do repeatedKfold CV. Please fi...
Let's assume that we are estimating a parameter of the population (e.g., mean height or weight). We've gathered our sample and calculated confidence intervals around the parameter of interest. Are we, therefore, assuming that this parameter follows uniform distribution over the confidence interval? In simple terms, is ...
Can someone explain me the interpretation of volatility clustering from ACF of the absolute returns? I got two graphs of ACF of the absolute returns (first one for daily returns, second one for weekly returns):
Let $X_1, X_2, ... , X_n$ be a sample drawn without replacement from a finite population. $X_1$ may be the random variable - weight of the first person; $X_2$ may be the random variable - weight of the second person, etc. Then the random variables $X_1, X_2, ... , X_n$ are not mutually independent, but they are still s...
Looking for the best way to set up an AB test. Scenario is that the online product I am working with has logged in users that pay a monthly fee, and they can upgrade to get access to more features. Each user has a 'propensity to upgrade' score that is calculated daily by a machine learning model. For simplicity, assume...
The following table presents frequency distribution of teachers of 1 year: Rank ----------Frequency Professor ------------7 Assoc Professor ------4 Asst Professor--------3 Instructor -----------5 Others ---------------3 1)find mean, median and mode. 2)which is better measure of Central tendency: mean or median or mode ...
Can you help me understand this transformation?? I cannot understand this thing.. I heard that this is transformed by the law of total expectation but I can't apply it.. help me please.. I understand this formula.. but I can't understand what I asked.. Deriving Bellman's Equation in Reinforcement Learning
Some random variables are transformations of a standard normal. For example, a draw from a normal density with mean $b$ and variance $s^2$ is obtained as$$e = b + s\epsilon$$ where $\epsilon$ is a draw of a standard normal. I have a model and I estimate various parameters of the model using the maximum likelihood princ...
I have longitudinal study to analyse. M patients examined at N time points. I want to run a marginal model via GLS estimation with unstructured residual covariance. But I want also to apply the Kenward-Roger degrees of freedom. In R, in which I work, this is impossible for the GLS. I have to switch to a mixed model, us...
This question will seem very beginner in this forum, but I'm indeed a beginner. I am attempting to understand method of least square for regression. So, likelihood of parameter is defined as $$\mathcal L(\vec\theta)\stackrel{\text{def}}=\prod_{i=1}^mp_Y(\vec y^{(i)}|\vec x^{(i)};\vec\theta)$$ It seems like the squared ...
I'd like to know if my intuition behind exclusion restrictions that we place to identify the structural vector autoregressive (VAR) models is correct. This is a question not only for econometricians but also for statisticians. I'm sure they can both easily answer. Let's say we have a very simple 2-dimensional system de...
If I have two patient groups (disease+ vs disease-) and I want to compare both groups in terms of their BMI. There are n = 30 in the disease+ group while only n = 18 in the non-disease group. As far as I understand, the first step is to check the normality of the BMI data in each group and I used the following code: wi...
Suppose you have 6 or 7-time series that are stationary. But my question is what does happen to a VAR when I standardize all the variables of the VAR This makes that the mean is 0 and the standard deviation 1. What implications does the VAR with standardized data have?
I'm planning to use a discrete-time stochastic process defined in the following paper: Nicolau, J. (2002). Stationary Processes That Look Like Random Walks—The Bounded Random Walk Process in Discrete and Continuous Time. Econometric Theory, 18(1), 99–118. https://doi.org/10.1017/S0266466602181060 On page 109 of the p...
I have three mean estimates, all from variables assumed to follow a Normal distribution. The following is a mock example. x1 is estimated at 4, with a standard error of 5 and 6 degrees of freedom x2 is estimated at 6, with a standard error of 4 and 6 degrees of freedom x3 is estimated at 7, with a standard error of 3 a...
I am planning to apply propensity score matching with exact marching on two categorical variables and balancing on the rest of my covariates. Are the weights obtained from the matchit function related to balanced covariates or a combination of balanced covariates and exact matching?
I used FDR correction (i.e., Benjamin-Hochberg tests) from the R 'Stats' package, but I'm confused of the q value used in the package. The notations in the 'p.adjust' function does not include the default setting for q values, which makes me feel a little less confident. For example, here is my original p-value list: ...
Attempting to create code that generates x1...xm values, time series plot, and autocorrelogram given certain coefficients and white noise. Code built so far: coeff <- c(-3,-2) init <- c(0,1) m <- 6 current <- init val <- 1 + length(init) while (val <= m) { val = val + 1 current <- c(current%*%coeff, current[1:(leng...
I'm preparing for an exam in Computer Vision. I came across with the following question from one of the exams: What is the number of parameters of a convolution layer in a neural network, when the input size is $100 \times100 \times128$ and the output $100 \times100 \times256$, the convolution size is $3 \times3$, wit...
Let us consider the following Hierarchical Bayesian model: $w \sim\ Beta(20, 20)$ $K = 6$ $a = w * (K - 2) + 1$ $b = (1 - w) * (K - 2) + 1$ $theta \sim\ Beta(a, b)$ $y \sim\ Bern(theta)$ The above is the example of figure 9.3 in the book Doing Bayesian Data Analysis by John Kruschke. I use the pymc3 to construct the ...
I am working with a dataset which has 34 features (numerical, nominal) and the target class. Several of the columns have missing values, especially one column has approximately 50% missing values. I have not been concerning, because in R Naive Bayes works perfect no matter missing values or type of features, but since...
I understand that when n approaches infinity binomial distribution also approaches a Poisson distribution. What about the normal distribution? I googled and found that if n approaches infinity and p and q are large (not close to either 1 or 0) then it follows a normal distribution. But if p is large np should also be i...
I've been looking for an answer for a question (which I thought was rather trivial) for a while now, but can't seem to get the correct solution for it. I'm working on data of blood parameters (e.g. hematocrit, HCT; a continuous variable) from fish reared under different temperature treatments (treatment; a factor). Th...
Let us suppose that I have a multivariate time series with two variables that vary together in time: var1 and var 2. And let us suppose that I want to forecast the n-ith value of var 2, by considering a window with the n-1 past values of var1 and var2. I would like to use a LSTM in the first layer. I'm not sure if it w...
We measured species abundance and corresponding temperature, rainfall, and pH across 500 sites. I want to run a regression measuring species abundance to abiotic variables. I am having a hard time specifying the formulae because I am not sure how best to visualize the graph to eyeball what's a good fit. For instance, t...
I'm in a setting where I have natural population strata (that I can infer from the samples), but I don't know the strata sizes. Are there ways to get valid confidence intervals in this setting?
I have two randomly assigned treatment interventions (A and B), and two subgroups of individuals (X and Y). This is a longitudinal study with dropout. I want to test whether the outcomes of individuals treated with B are different in subgroups X vs. Y. I know how to compute the "least squares means" and average treatme...
I was asked to prove that $K$ is a valid kernel: $K(\vec{u}, \vec{v}) = \sum_{i=0}^M {a_i(G(\vec{u}, \vec{v}))^i}$ with $a_i \ge 0$, given that $G$ is a valid kernel. I tried to prove it using symmetry and positive semi-definiteness. For symmetry, it's trivial, but for positive semi-definiteness: Positive semi-definit...
I am building a species distribution model for an animal, using data collected by community members when they sight this animal. My first step is to fit a generalised linear model with family binomial against several environmental variables, and then use this model to predict occurrence to a broader area. The raw data ...
I have discovered that the function umxEFA in the R package umx can do a factor analysis with more variables than observations. A normal factor analysis cannot do this because the covariance matrix becomes singular. The umxEFA function is doing a factor analysis by treating the factors as latent variables in a structur...
If $X_1$ and $X_2$ are independent and follow asymptotic standard normal distribution as $\min(n_1,n_2)\to\infty$, how do I show that $\frac{\sqrt {n_1}X_1+\sqrt {n_2}X_2}{\sqrt{n_1+n_2}}$ also has an asymptotic standard normal distribution? The problem would be trivial if $n_1$ and $n_2$ would be constants and $X_1$ a...
Given a parametrical model $f_\theta$ and a random sample $X = (X_1, \cdots, X_n)$ from this model, a statistic $T(X)$ is sufficient if the distribution of $X$ given $T(X)$ doesn't depend on $\theta$. Is there a standard way to compare two non-sufficient statistics to tell which is the closest to be sufficient? Some ki...
A quick question on how to interpret balance measures in a IPTW analysis. Here is an example code from the cobalt package: require("WeightIt") require("cobalt") data("lalonde", package = "cobalt") #If not yet loaded covs <- subset(lalonde, select = -c(treat, re78, nodegree, married)) #Generating propensity score weigh...
Dears, I am having trouble making sense of two MLMEs I did using rma.mv(). I am using a factor variable with 4 levels as a moderator. The two outputs (once with intercept, and once without it) are spitting out different p-values, and different estimates. The estimates are all Pearson's Rs. This is the output for the mo...
My model consists of an ordered factor with four levels as the response variable and a continuous predictor. mod <- gam(lev ~ s(pred), family = ocat(R = 4)) The smooth of the predictor looks like this: The estimated threshold values are: > mod$family$getTheta(TRUE) [1] -1.00000000 0.09669527 1.27291819 However, th...
I am trying to understand neural networks and by reading different articles I always find conflicting information. I wanted to understand which neural networks can be used as supervised/unsupervised. One of the many articles I have read is this one and an answer is the following: "CNN is not supervised or unsupervised...
I have this idea in mind, but I am not sure how to implement it. Suppose I have an imbalanced data that I want to down-sample instances of majority class, such that it becomes equal in size to the minority class. I want to use SVM to select from majority class, it's class support vector(s) and examples near distance su...
I've got repeated measurements data on a continuous, time-varying exposure and a continuous outcome. The exposure was measured 1-3 times per patient, and the outcome was measured only once for all patients (at the last measurement of the exposure). I'm trying to determine if an association exists between my exposure an...
Am relatively new in conducting survival analyses in R. I wanted to perform an univariate cox regression on my data set. For some of my variables this worked, but for the variable “white blood cell count” (WBCC) I got an warning message. The data frame looks a bit like this (dummy data): |sample_ID | Age |Gender |WBC...
I was reading online tutorials on lift and gain charts here, here, here In all of these tutorials, I read or see that random model curve is drawn with the expectation at each Xth decile, we get X% response. X can range from 1 to 10. For ex: In decile 1, response rate using random model is 10%. In decile 2, it is 20%, 3...
I'm an energy engineer, so my knowledge on the argument is rather limited, so forgive me in case it's a stupid question. This question is very linked to this: How can I find the standard deviation of the sample standard deviation from a normal distribution? but instead of drawing samples from one unique normal distribu...
I am currently reading about causal machine learning, e.g. causal bayesian networks. I am wondering about the assumptions on that the causal machine learning models are based. For example, for linear regression the error term needs to be uncorrelated with the regressors so that the effect of the regressors on y is unbi...
I am trying to find a way to test if a R-squared value that is high (>90%, on a small sample of c30 observations) is not significantly different from 1 (or at least from a number very close to 1, 0.999 say). Equivalently, I would be happy to find a way to test if a sample correlation is not significantly different from...
I did an experiment where I monitored phenology of a specified number of plants (multinomial ranking) and as weeks went by, I used some of the plants for experiments and removed them from the plants being monitored weekly. So sample size was decreasing every week. What distribution should be used in R to model the prob...
I get this question up until the underlined part, would someone be able to explain the rest of it to me as its had me stumped for a little while now.
Let's say my predictor is X, my outcome is Y, and a have say 5 potential confounders (Z1 up to Z5), and all of my variables are binary. I am using Stata for my analysis. I have already ran the crude analysis (i.e., logistic Y X). When assessing for confounding using the change-in-estimate (CIE) criterion, do I analyz...
I am using the pscl package to fit a simple zeroinf(...,dist = "negbin"). I would like to simulate the probability distribution from this fit. Using another post on cross validated (Simulate from a zero-inflated poisson distribution) I see the following for the poisson case, but I am not sure what to do for the negativ...
I was solving this question about tuning hyperparameters and I don't understand how to choose the number of hyperparameters by using the training error (TE) and the validation error (VE). Define the variance as VAR=TE$-$VE. The question is the following: You are tuning a hyperparameter for an algorithm. The following t...
There are the following lines in Casella & Berger on page 438, before the equation (9.2.22): ..., write $$\lambda = \frac{\lambda}{\chi _{2Y}^{2}}\chi _{2Y}^{2}$$ where $\chi _{2Y}^{2}$ is a chi squared random variable with $2Y$ degrees of freedom, and $Y \sim \textrm{Poisson}(n\lambda)$. Then, as $\lambda \to \infty...
I am trying to calculate the variance of $s^2=\frac{1}{n-1}\sum (x_i-\bar x)^2$. So what I want to find is $ Var(s^2)$. I have seen different posts, but many of them seem to make the assumption that the population is normally distributed. I don't know anything about the distribution. Can anyone help or guide me in the ...
I have very small time series data(24 points) for sales for different-different regions. I need to build Range Forecast (Confidence/Credible Intervals) for sales around it for every region. I tried FB's Prophet, XGB, ARIMA, SARIMAX but my ranges are very wide (more than 100% of my historical sales) as my data for some ...
I have a large search space of ~600 time series, where I am constantly scanning for stationarity (I have a "rolling window" for all the time series where I run a stationarity test at every time point to see if the series has reached stationarity or not). This means I'm running the ADF test probably thousands of times. ...
I'm currently working through this textbook question: "The length of three javelin throws is normally distributed, with: $$ \mu = 253, \sigma = 8.4 $$ What is the probability that the longest of his three throws is 270 ft or more? The basic z-test is easy enough: $$ \frac{X -\mu}\sigma = \frac{270-253}{8.4} = 2.0238, P...
I constructed a negative binomial model for examining the relationship of 1 count variable="carid_den" on another "juv_cneb_den" (with an offset="Area_towed"), along with a factor of location ="Zone". A summary command on my full model indicates all levels of the factor are statistically insignificant (>0.05). Upon dro...
I've recently thought of an extremely simple way to interpret an AB test. The only issue is, I'm not sure it's actually a valid approach — I do not have formal training in statistics, so this might be complete nonsense... Let's say that I operate an ecommerce site, and I've recently completed an AB test concerning the ...
I want to confirm whether my interpretation makes sense, hope you can guide. I'm testing the effect of an email intervention on an outcome (attendance rates to an event). Main Group Observations Turnout rate was lower with intervention than without (Odds ratio was 0.7) Difference is statistically significant. (yes, sa...
I'm trying to determine if different linear regressions are statistically different from one another. For that, I used the regression function for my different treatments (round, triangle and square in the figure) and then used the slope values (a) and error. So I did t-tests to see if treatments are significantly diff...
For simplicity I'll stick to the univariate case with one exogenous regressor. Suppose I have X = (x1, x2, ..., xn) Y = (y1, y2, ..., yn) where i < j indicates xi came before xj chronologically, and likewise for yi and yj, regardless of the unit of time, for 1 <= i < j <= n. Leaving aside the usual caveats about the in...
Let's say I have two samples with relatively small sample size and their distributions are skewed. The population distribution is assumed to be normal. It just so happens that these two particular samples were skewed. The size of the samples is relatively small (10). Is an unpaired t-test still valid? I don't understan...
With the python package Keras, you can use $\ell_2$ or $\ell_1$ regularization but you have to use the option on each layer. But I definitely cannot tell if using it layer after layer is equivalent to this minimization problem (for example with $\ell_1$/LASSO): $$ \min_{\boldsymbol{\omega}} \frac{1}{n} \sum^n_{i=1} (y_...
I have some time series data that I am trying to model - basically historical elasticity reads with daily sales data. I really am just interested in finding the 'mean' value - not necessarily predict future elasticity - at least not as of now. Unfortunately, I only have 2 year of so data and daily reads are too noisy...
Note: I've edited my question as recommended below by @EdM. Suppose I have a supervised learning problem on a sizeable tidy dataset with real values—-e.g., the dataset has 100,000 rows or observations. I with to apply a linear regression and understand that there are two basic forms of linear regression analysis: expla...
I want to compare two tools, A and B. I use tool A to measure 10 very different objects, making 5 repeated measurements for each object so I can record an accurate value. I also do this with tool B. Now I have some options: Average each 5 replicate measurements and do a single paired t-test. But there must be some err...
I'm new to the coefficient of variation. I'm trying to get at the precision of estimate. Using my software (Stata) I have an estimated percentage of 25% and a reported CV of 18. couple of questions: Does the CV make sense for a proportion? I've only seen it for counts. Is the CV of 18 interpreted as 18%? thanks.
Is there a way to calculate transfer entropy between two time series having different lengths? Given two time series: $x=(x_1,x_2,\dotsc,x_n)$ $y=(y_1,y_2,\dotsc,y_m)$, where $n \ne m$. Is there a way to calculate the transfer entropy from $x$ to $y$? Would it make sense to apply padding on the shorter series? Are ther...
For some context, I am trying to follow this neuroscience paper (https://www.nature.com/articles/nm.4246?TB_iframe=true&width=921.6&height=921.6) Regarding my data, I have 2 datasets, one as a train dataset and the other as test dataset. With my training dataset, I have 100 samples (people). Each person has clinical da...
I have collected a binary classification dataset in a somewhat biased way: I have thousands of unlabeled samples. A small percentage of these samples belong to the positive class. I know for a fact that my regressors are strongly correlated with the target. Using this fact I can collect positive samples by picking sam...
I've been studying a piece of code lately that uses the Monte Carlo acceptance-rejection method to draw random samples from a distribution I'm struggling to identify. Here's a Python implementation: import numpy as np def gen_alpha(sigma_alpha=0.000125): rng = np.random.default_rng() f_max = 4.0 * sigma_alpha ...
I have sample data and I have one variable which records distance from resident to place of work. I have to chose that this variable is actually of what type. It is Quantitative continuous for sure. But I am confused that it justifies which category more? Quantitative continuous on a ratio scale or Quantitative continu...
Suppose I have the following data set break down: Group A: subjects $A_1$, $A_2$, $A_3$, and $A_4$ Condition 1, Condition 2, Condition 3 All four subjects have a corresponding value for each condition: $\{A_1^1, A_2^1, A_3^1, A_4^1\}$ $\{A_1^2, A_2^2, A_3^2, A_4^2\}$ $\{A_1^3, A_2^3, A_3^3, A_4^3\}$ Therefore we have t...
I'm doing multilevel logistic model in R. To check the model diagnostic, I draw the following QQ plot. But it seems hard to say in which way it skews. I'm a bit confused what conclusion can we draw from this plot and what can we do to fix the problem?
I am running a R.P. flexible parametric survival model (hazards) in Stata, using the stpm2 package and I have encountered a possibly unusual scenario. My Royston & Sauerbrei’s R^2 (not adjusted) value reduces a lot when additional predictors are added to the model - from 21% to 15% with the inclusion of a 2nd predictor...
A random sample of $n$ individuals are classified into three groups, with probabilities $\theta^2$, $2\theta(1-\theta)$, and $(1-\theta)^2$ respectively, yielding the trinomial distribution over the group sizes $(x,y,z)$: $$P(X=x, Y=y, Z=z)=\frac{n!}{x!y!z!}\theta^{2x}[2\theta(1-\theta)]^{y}(1-\theta)^{2z} $$ for $x, y...
I'm trying to compute the Gini Index for different examples given in this page. I don't get what I'm doing wrong, as the formula showed is: $Gini Index = 1 - \sum_{i=1}^{C}(p_{i})^{2}$ And my code trying to implement that formula: def gini_index(lista): suma = 0 for i in set(lista): p = (lista.count(i) ...
I am working with a data set where the response variable is binary and 15-20 continuous and categorical variables. I am using the naiveBayes library to compute the model. I am interested in understanding which of the independent variables are the most important as well as trying to better understand the model outputs (...
I have just started my statistics journey and as part of assignment I was given one statement and had to deduce population, sample etc from it. The statement is as follows: A council wishes to study the digital awareness of its resident senior population (over 65 years), so it questioned in person 50 inhabitants rando...
If $X_1,\dots, X_n\sim Poisson (\theta_1)$ and $Y_1,\dots, Y_n\sim Poisson (\theta_2)$, and $X_i$ is independent of $Y_i$, we want to test $$ H_0: \theta_1=\theta_2, \, H_a: \theta_1\neq \theta_2 $$ What is the limiting distribution of $$R_n=2(l(\hat{\theta})-l(\tilde{\theta}))$$ under null model $H_0$, where $\hat{\th...
I've seen that early stopping is a form of regularization that limits the movement of the parameters $\theta$ in a similar way that L2 Regularization penalizes the movement of $\theta$ to be closer to the origin. Does that mean that I can avoid overfitting if I use a regularization other than Early Stopping and train f...
Usually, to better generalize and have a better understandability of the underlying model, we prune the decision trees. And in some cases, it is still large and difficult to interpret. Is there any other technique (not pruning) that I can apply to make the tree smaller?
Tools/languages/techniques I am using python scikit-learn different regression models (only linear regression is shown here for simplicity) I am working on a regression problem. The data I have is time-series hourly consumption data and I am trying to make a step-ahead prediction. I first prepared the data and made s...
I created a hypothesis for a chemistry assignment and then conducted an experiment. The experiment resulted in a graph that had a downward trajectory. It looked like this: I found the data points by calculating the averages of the temperature and reaction rates of certain reactants. Variable X and variable Y represent...
I am generating 10,000 pairs of X and Y such that both X and Y are standard normal and IID, and I'm storing them pairwise in a variable called Z: import numpy as np m=10000 k=2 Z = np.random.normal(0,1,(m,k)) # Mean=0, Std_Dev=1 Now, I remove those pairs with x+y>0, so I'm left with a new set of {x,y} with x+y<=0: Z_n...
I have some model, $f(x)$, that takes in some input and produces some output. Now my input are random variables distributed according to some distribution. The output are also random variables with some distribution, however it is different. Problem The input distribution represents prices. Now, I have very few real da...
I am reading the excellent book "Forecasting: Principles and Practice" and in chapter 7, section 5 there is the small section. Beware of inference after selecting predictors We do not discuss statistical inference of the predictors in this book (e.g., looking at p -values associated with each predictor). If you do wis...
I have the 10th, 20th, 25th, 30th, 40th, 50th (I assume this is the same as the mean), 60th, 70th, 75th, 80th and 90th percentile values of a data set. This is for the distribution of salaries in the UK, which I assume is a Bell curve, but I might be wrong. I would like to know the 99th. Is there a formula or an online...