instruction
stringlengths
9
38.7k
Let $X_1, X_2, \ldots $ be an infinite sequence of i.i.d. random variables with $E(X_i)=\mu$ and $\mbox{Var}(X_i) < \infty$. The law of large numbers states $\lim_{n \rightarrow \infty} \sum_{i=1}^{n} \frac{X_i}{n} = \mu$. Wikipedia mentions that "other formulas that look similar are not verified". In other words $\lim...
Let X and Y be two independent discrete random variables with PMFs $$\begin{equation} P_X(k)=P_Y(k)= \begin{cases}\frac{1}{5}, & \text{for}\ x= 1,2,3,4,5 \\\ 0, & \text{otherwise} \end{cases}\end{equation}$$ Define Z= X-Y. Find the PMF of Z. My answer with working: $R_X= R_Y= (1,2,3,4,5)$ and $R_Z= (-4,-3,-2,-1,0,1,2...
According to this page, the square & logistic loss functions are "bayes consistent": A Bayes consistent loss function allows us to find the Bayes optimal decision function ${\displaystyle f_{\phi }^{*}}$ by directly minimizing the expected risk and without having to explicitly model the probability density functions. ...
Situation Our use case: demand forecasting for sales and operations planning monthly granularity, ~5 years worth of historical data available goal is to forecast future time windows of 1, 3 and 12 months forecasts are generated twice per month We have a time series forecasting system in place. It uses basic ARIMA a...
I'm working on building my understanding of generalised linear mixed-effects models in R. I have a toy dataset which is an RCT of treatment with aspirin that followed up people over time to track their outcomes, including death. The intervention was clustered by city in this dataset. My current code is: # Import librar...
I have data that follows LogNormal distribution in the body (high density region) of the distribution and it seems like it has an Exponential tail after a particular 'cut' point. Given that these two distributions are parametrised differently, I am curious if there is any way how the discontinuity in parameters can be ...
I have trouble of deciding whether I should go for paired or unpaired test in my case. Let's say that I need to evaluate the performance of two search engine configurations and check whether the performance of Configuration 2 is better than Configuration 1. I can either: compare the search performance on two independe...
I want to build classification machine learning using logistic regression. First i check my model roc_auc score using train test split and check with k cross validation. Turns out there is indication that my model is overfit.. so i decided to do hyperparameter tuning. After i got some best parameter from hyperparameter...
I am trying to understand if the model published in section 4.1.1 here is or is not an Empirical Bayes model (which the author claims it is). Or, maybe, if it is a valid one or not. The model looks as follows: $$ X_i|\theta_i\sim N(\theta_i,\sigma),i\in\{1,2,\ldots,n\},\text{ and }\sigma \text{ known}\\ ~\theta_i|\eta_...
Is there any underlying assumption when we can reliably use Cohen's D? Do we assume our samples should be Gaussian? I know that Cohen's D is heavily biased by outliers and sample size. But is there any assumption on which it works?
I wish to display the (un)reliability in ranking of variables in an omics dataset in the classification of disease vs healthy. In this case it’s mostly of academic interest, as many use rank-based univariable screening to identify the (apparent) “best” markers in e.g. prognostic biomarker studies. I wish to show, in my...
I am currently working on an empirical design that, at first sight, reminds me of a classical difference-in-difference (DiD) setup. Let me give you an (imaginary) example: Assume we are observing bank loans that were originated between 2010 and 2015 and how they are traded (priced) on the secondary market, meaning that...
Question: Are there (known) variance stabilizing transformations for logistic regression? Backgound: As an M-estimator, logistic regression is asymptotically normal, under suitable regularity conditions. The asymptotic variance, however, depends on the unknown parameter $\theta^*$. Say, $$ \sqrt{n}\left(\hat{\theta}_n-...
I'm doing a design of experiments unit. I came up with prediction equations that predict the speed of a robot completing tracks of different types. The prediction equations give the settings for the best speed of the robot (m/s) for any particular track. The equations give a prediction for the average and the variance,...
i'm still confused about scoring parameter in randomized search First i want to know if my machine learning model is overfit or not. I use roc auc score between train and test.. turns out there is large gap between roc auc score between train and test. So i decided to do hyperparameter tuning. For information this case...
Suppose $Y,X$ are two continuous random variables, with supports $\mathcal{Y}$ and $\mathcal{X}$ respectively. Let $f_Y$ be the pdf of $Y$ and $f_{Y|X}$ be the pdf of $Y$ given $X$. We know that, for each $y\in \mathcal{Y}$, $$ f_Y(y)=\int_{\mathcal{X}} \underbrace{f_{Y|X}(y|t) f_X(t)}_{\text{joint pdf of $Y,X$}} dt $$...
I'm trying to find ways to do survival analysis on data with asynchronous interval-censored outcomes and time-varying covariates. I know that GLM binomial with a complementary log-log link function can be used in the analysis of synchronous interval-censored cases ref. On the other hand, GLM Poisson can be used to appr...
I have a question on how to derive the (marginal) pdf for the $k$-th random variable $X_k$, where $X_k = \cos(0.2\pi k + \theta)$, and $\theta$ is a random variable uniformly distributed over the interval $[0, 2\pi)$. Could anyone show me how to derive this?
I fitted a logistic regression model with a binary exposure variable X, trying to understand the effect it has on a given outcome Y, which measures infection (yes/no). I calculated the odds ratio of the variable of interest as well as the Average Marginal Effect, both highly significant. Particularly, in my case the AM...
I am curious as to how do find the likelihood function for the exponential distribution with parameters such as this: $$X \sim \exp(\beta- \mu) $$ With the following assumptions, $\beta$ is known $\mu< \beta$ We have an access to an i.i.d. sample $X = X_1, \dots, X_N$ of size $N$ Do we just substitute $(\beta-\mu)$ i...
I conducted a multilevel binomial regression (glmer) and I obtain quite wide confidence intervals for my odds ratio. What could be causing such large 95% CI and what can be done to provide more precise CI? Is it right to assume that odds ratio can be interpreted in the same way for a multilevel logistic regression as f...
Is it possible, through the output of the following code, to state that these two variables have a non-linear relationship? I found this code on the internet along with a statement that there is no linear relationship between these two variables, but I can't understand how to interpret these values to reach the respect...
I have a small set ( $n \approx 200$ ) $(x,y)$ data points representing the find location of a person on a landscape. From this, I generate a $20\times 20$ histogram and fit the fairly basic model class GPModel(gpytorch.models.ExactGP): def __init__(self, train_x, train_y, likelihood): super(GPModelWithDeri...
I am running a Linear regression and had encountered a situation where if I divide the total timeseries of data into segments I see a $R^2$ of 60% to 80%. But when I stack this data segment into a single data set and perform the regression the $R^2$ drop to just 10%. In other words if we consider 10 years of data and I...
I'm running a conditional logistic regression to assess habitat selection in coyotes. The conditional logistic regression essentially compares the environmental covariates of used locations (1's) to semirandomly generated "available" locations (0's) which are matched in strata to determine if certain covariates are mor...
Say I have an independent variable (x) and a dependent variable (y) for which I modeled the relationship using a simple linear regression (ols). I then use this model to predict on new x-inputs (out of sample data). How would I get the percent uncertainty (error) for each prediction on new x inputs? Example python code...
Given, we do not know if X,Y,Z are independent or not. Will the expression E[E[X|Z]|Y] = E[X|Z] hold true? What I have tried: Now, E[X|Z] is a random variable so let E[X|Z] be A So, problem boils down to E[A|Y] which can only be equal to E[A] if A and Y are independent. I would like to know if my thought process is acc...
Suppose I have a set $X$ with partition $X_1, \ldots, X_k$. Suppose $Z_i = (z_{i1}, \ldots, z_{iN/k})$ is a random sample of $N/k$ elements from $X_i$ and $Z$ is a random sample of $N$ elements from $X$. Can I treat "union" $\cup_i Z_i := (z_{11}, \ldots, z_{1N/k}, \ldots, z_{k1}, \ldots, z_{kN/k})$ of random samples f...
I believe this is very similar to the proof of the Gauss-Markov theorem. Suppose $E[\textbf{Y}|\textbf{X}] = \textbf{X} \boldsymbol\beta$ and $var(\textbf{Y}|\textbf{X}) = \sigma^2\textbf{I}_n$. How can I show that $\textbf{a}^T\textbf{Y}$ is BLUE(best linear unbiased estimator) of $E(\textbf{a}^T\textbf{Y}|\textbf{X})...
I am studying normal linear regression and wanted to ask a question about its utility when working with independent RV. Suppose that we have for $k \in [1,\dots,n]$, $$Y_k = \beta_0 + \beta_1x_{k1} + \beta_2x_{k2} + \dots + \beta_qx_{kq} + \epsilon_k \quad \text{where } \epsilon_k \sim_{ind} N(0,\sigma^2)$$ We can writ...
$$\bf{y}=\bf{X\beta}+\bf{\epsilon}$$ In asymptotic setting, assume: (a) linearity (b) $\{y_i,\bf{x}_i\}$ ergodic stationarity (c) weak exogeneity $E(\bf{x}_i\epsilon_i)=0$ (d) Rank condition $E(\bf{x}_i\bf{x}_i^{'})$ is nonsingular (1) assume (e) asymptotic normality of $\sqrt{n}\overline{\bf g}_n:\sqrt{n}\overline{\bf...
Normalizing data is helpful in most MCMC cases. Most of the times the suggested normalization is z-score. But what happens when I want to normalize data, which then I sample from a non-negative distribution ? E.g. let's say I model x = [263.1, 348.4, 362.0, 395.7, 479.2, 974.4] to come from an Exponential distribution:...
When it comes to threshold linear regression, in order to estimate it can we simply divide our dataset according to the threshold rule into 2 datasets and then simply estimate 2 equations with OLS? Or am I missing something important?
Short Background on Permutation Testing Suppose I have two sets of samples $P$ and $Q$ drawn iid from distributions $\mathcal{P}$ and $\mathcal{Q}$ over $X$. I also have access to a test function $T: X^n\times X^n\to \mathbb{R}$ that can take two sets of samples of size $n$ and output a real number. Say we have designe...
The input are a timeseries of 1x41x41 geospatial images (so, 5x1x41x41 for example). I managed to achieve an MSE of 0.53 with PCA and Random Forest. But I thought to use ConvLSTM since my input size is large and knowing that I can manipulate many variables to prevent overfitting.But as you can see from the image below,...
When we use anova() function to compare two or more models, what test is it actually performing? I don't think that's an "Anova" per si, right. Would it be a "a likelihood-ratio chi-squared test"* or anything else? Example: > mod1 <- lmer(Y ~ X1 * X2 + (1|ID), data = data, REML = F) > mod2 <- lmer(Y ~ X1 + X2 + (1|ID),...
I am quite new to causal impact. I have been using the python package 'causalimpact' since I read good feedback online and decided to give it a go. For context I am trying to check the impact of a marketing campaign, that happened multiple times throughout a given day (starting at 5.44 PM), on the visits. I am using tw...
Question 1: I'm wondering to what extent the repeated measures Anova extends the paired t-test? I came across this definition today. That being true, then, question 2: in a two-way 2x2 Anova, if the differences of scores is normally distributed, then there's no need for the variables be normally distributed? (such as...
Most standard IV framework looks at cases when both treatment (let's denote by $D$) and instrument (let's denote by $Z$) is binary. Let $Y(D)$ be the potential outcome (by using this notation, I'm implicitly assuming exclusion restriction). In this case, we have the following assumptions: Exogeneity: $Y(1), Y(0), D(1)...
I was going through the learn2learn library for meta-learning and saw this: classes = list(range(1623)) random.shuffle(classes) # todo: wish I wouldn't have copied l2l here and removed this...idk if shuffling this does anything interesting. Doubt it. train_dataset: FilteredMetaDataset = ...
By definition \begin{align*} \Sigma = F(\min(x_i,x_j))-F(x_i)F(x_j)\end{align*} Note: $\hat{F}_n(x) = \frac{1}{n} \sum_{j=1}^n 1_{\{X_j \leq x\}}$ I think that $\mathbb{E}\left[\hat{F}_n(x_i)\right] = F(x_i)$. Now considering \begin{align*}var\left(\hat{F}_n(x_i)\right) = \frac{1}{n^2} var\left(\sum_{u=1}^n 1_{\{X_u \...
Let $z_i$ be $i.i.d$ random variable with $E(z_i)=0$ and $E(Z_i^2)=1$ with a symmetric distribution. Further, $|\beta|<1$. Now consider $\sum\limits_{i=1}^{\infty} \beta^i (z_i+|z_i|)$. I want to prove this summation converges almost surely ($a.s$). End goal is finding $E(exp(\sum\limits_{i=1}^{\infty} \beta^i (z_i+|z_...
I am an MBA Student taking courses in Statistics. In our courses, we are learning about Regression Models and how to interpret the meaning of the parameters/coefficients in a Regression Model. For example, when studying "vanilla" Regression Models (i.e. Simple Linear Regression/ Multiple Linear Regression), we are told...
I have a population of National Teams (32), and parameter (mean) that I want to measure for each team, aggregated per match. For example: I get the mean scouts for all strikers for each team, per match, and then I get the the mean (or median) for all team matches. Now, one group of teams have played 18 matches and ano...
I wish to estimate the size parameter of the negative binomial distribution in R. Ideally I would like to estimate the size parameter when all I have are n = numbers of samples, m = mean count per sample, and n*m = total counts. I started out with the binomial distribution and estimated the binomial probability sever...
I am running a regression model where participants rate how they feel at 2 timepoints. Each participant rates how they feel at time 1 and time 2 (within subjects design) The following model returned an error (see error below): lmer(feeling ~ timepoint + (1 + timepoint|sub_id), data = d) Error: number of observations (=...
I am learning ROC about multiclass problem. I read this article https://towardsdatascience.com/multiclass-classification-evaluation-with-roc-curves-and-roc-auc-294fd4617e3a . I am confused about ovo problem. Is “Class1 vs Class2” is different than “Class2 vs Class1”? I read other paper saying that n classes will only p...
I have a small question about the derivation in the InfoNCE paper and it is killing me. In appendix A.1, it is estimating the mutual information with InfoNCE as follows: $$ \begin{align} \mathcal{L}_{N}^{opt}&=-\mathbb{E}_{X}log[ \frac{ \frac{ p(x_{t+k}|c_{t}) }{p(x_{t+k})} }{ \frac{ p(x_{t+k}|c_{t}) }{p(x_{t+k})}+\sum...
I am an MBA student taking courses in Statistics. I attended a seminar hosted by the Statistics faculty in my university in which students present the research they are doing. The students had data (e.g. age, gender, race, number of children they have, which university they studied at, what they studied in university, ...
I am an MBA Student taking courses in statistics. I was doing some reading online and came across Carstensen (2020), which I unfortunately do not have access to. This article suggests that "categorizing quantitative variable" is bad - but I am not sure why this is. Our professor in our statistics courses showed us exa...
I'm reading through Student's "The Probable Error of a Mean" from 1908 and I'm not sure what notation he is using. He says that if $s$ is the standard deviation from a sample $x_1 x_2 \ldots x_n$ then $s^2 = \frac{S(x_1^2)}{n}-\left( \frac{S(x_1)}{n} \right)^2 = \frac{S(x_1^2)}{n} - \frac{S(x_1^2)}{n^2} - \frac{2S(x_1x...
I'm using glmmTMB model with mixed effects and beta distribution and I'm wondering is there a way to count degrees of freedom of my model variables (they are not in my model output)?
Context In the price elasticity of demand modeling field. I have some data to use, which the basic is average weekly price and volume of a product. As you can see in the image, each point represents the weekly value of transactions. The goal is to weight values in order to give importance to more recent value. Accordi...
A box contains two coins: a regular coin and a biased coin with $P(H)=\frac23$. I choose a coin at random and toss it once. I define the random variable X as a Bernoulli random variable associated with this coin toss, i.e., X=1 if the result of the coin toss is heads and X=0 otherwise. Then I take the remaining coin in...
New to Bayesian Modeling and the python library PYMC. Got some confusing result. How would an expert on Bayesian modeling interpret these graphs? with BVAR_model: trace = pm.sample(chains=4, random_seed=rng) az.plot_trace(trace) After changing the number of lags, from 2 to 4, and applied differencing I got the f...
So, the data is comparable to height of individuals within Africa and Europe, but each group (Europe, Africa) have multiple replicates (3 x month sampled). Each replicate is ~100,000 individuals. A standard method would be to take the mean from each replicate and use those to compare the two groups, however this reduce...
As an input I have the mean (expected value) of a probability and the 95% upper bound. Now, I would like to define the α and β parameters for a Beta distribution such that I can do Monte Carlo simulations. I know the expressions for these parameters in terms of E[X] and Var[X], but do not have Var[X] directly available...
There are two random variables $X,Y$ with deterministic non-linear surjective and non-injective relationship $y=f(x)$ and I know unnormalized pdf $\hat{p}_y(y)$. I want to obtain samples $y \sim p(y)$, but I want to perform sampling in the space of $X$. The theory says that I have to use variable transformation $p(y)dy...
I have a small kernel svm code. from sklearn import datasets from sklearn.svm import SVC import numpy as np # Load the IRIS dataset for demonstration iris = datasets.load_iris() X = iris.data y = iris.target # Train-test split X_train, y_train = X[:140], y[:140] X_test, y_test = X[140:], y[140:] print(X.shape, X_t...
This question relates to bounds on expectations of order statistics, elaborated upon in the Book by Arnold and Balakrishnan (1989). Let $X_1,\ldots,X_n$ be i.i.d. continuous random variables distributed on a positive and finite interval $[0,a]: a \in \mathbb{R}_+$. Denote by $\mu_i=E[X_i]$ and $\sigma_i^2=var(X_i)$. Le...
I am plotting the precision-recall curves for my models which I have built using an imbalanced dataset. I initially plotted the precision-recall curve for my models using the plot_precision_recall_curve function directly, like so: # split into train/test sets trainX, testX, trainy, testy = train_test_split(X, y, test_s...
I'm wondering about the difference between MTBF and lifetime (I've to admit I'm not sure whether the last link is too specific..). source source To make it precise: Let's say there is a single mechanical item, what would MTBF and lifetime tell about it?
This is a pretty elementary question, but I can't find an answer to it! Assuming I have a lognormal distribution represented by $\log(X)\sim N(\mu,\sigma^2)$. How do I interpret the likelihood of an event occurring in $X$ based on the $\sigma$ of $\log(X)?$ Would it be correct to state : that $68\%$ of the observatio...
I have around 20 Million time series(say of product demands or merchant's activity for a few past years). I am looking to develop: An automated way to classify these time series as being regular or seasonal(Seasonal here means there is peak activity in some part of the year say every April or even April-May-Jun). For...
In the clinical trial design, we often make assumptions about clinical endpoints. For example, we may assume the blood pressure followed a normal distribution, such as $ X \sim N(\theta, \sigma^2)$, $X \in (-\infty, +\infty)$. From the perspective of clinical practice, a negative value of blood pressure is impossible o...
What's the best way to find an estimate of weather factors' thresholds/lower/upper limits for a response variable (in my case disease severity) in studies conducted under field conditions? I have managed to find out that disease severity increases with increasing rain & relative humidity & temperature but I'm struggli...
I have data about storage consumption for a lot of users (N > 50k+). The raw data distribution would look something like this: Given the outliers, to get an estimate of how much storage each user consumes I'd like to build a confidence interval for the median memory consumption (I guess I could build it for the mean i...
I have a dataset for 100 households and 10 years. I created a new variable called x1hat conditional on the household identifier. Then, I assigned the same value as under variable x1 to all households from 1 to 60. All other households should have a x1hat which equals x1 + 100. I've tried the following code in r: #crea...
I am running a logistic regression using a set of several predictors as well as several interaction terms. For each predictor, I am running a Wald test in statsmodels to test whether or not a predictor is significant in my model. I am doing this by testing the joint hypothesis that all terms involving the predictor (in...
Suppose I have a matrix with 34 binary predictors and a large number of observations such that there are always 5 ones per observation (i.e., 5 of the predictors are randomly set to 1 in each observations). Most of the matrix consists of 0s: library(Matrix) set.seed(132) R <- 34 m <- 5 reps <- 37980 out <- replicate(re...
I'm developing a code to predict how many bikes will arrive at a given station. The issue is that I'm having a hard time interpreting my metrics: On the one hand, it looks like I have a good MSE and a good RMSE, but adjusted r^2 and r^2, both negative, telling me that my model has a worse fit than a horizontal line. Ho...
I am trying to perform stepwise regression with direction as "both" based on BIC in r. But everytime is performing based on AIC only Following is my code train <- read.csv("Regression_train.csv", header=TRUE, stringsAsFactors=FALSE) test <- read.csv("Regression_test.csv", header=TRUE, stringsAsFactors=FALSE)...
The formula writes as this: $$I(X) = \left(\frac{\partial Z}{\partial X}\right)^\top I(Z) \left(\frac{\partial Z}{\partial X}\right),$$ in particular, if $Z = AX$, we have $$I(X) = A^\top I(Z) A.$$ Based on my understanding if $A$ is a short-fat matrix, this still holds. My question is that what if $AX$ is not sufficie...
Many statistical courses teach sampling techniques, such as rejection sampling and importance sampling, to sample data from a distribution. What are some concrete scenarios where a statistician needs to apply a sampling technique?
Is it possible to get credible intervals for regression paths using Blavaan package? Or, p-values for the regression estimates? R Code: ###------------Run Model: 1A----------------### Model1A <- ' C_ERC_ER ~ Valid + S_CCNES S_CCNES ~ C_attachment Valid ~ C_attachment C_ERC_ER ~ C_attachment #Estimating variances...
I have seen this, but it doesn't help me here. Here is my setup: I have four categories, and want to simultaneously test whether p_1 = 0.4, p_2 = 0.35, p_3 = 0.15, p_4 = 0.10. I am using a chi squared goodness-of-fit test here. I find that I should reject the null hypothesis, meaning that at least one of these populati...
I have a question. There's a library (uses this paper) which suggests in its cross lingual part that if the XLM-R is trained in english dataset, it can be directly applied to datasets in other languages, and zero shot cross lingual transfer can be conducted. So, my question is, if I trained XLM-R for english summarisat...
A cumulative distribution function is a function that returns probabilities of $X$ being smaller than or equal to some value $x$: $$Pr(≤)=()$$ What would you call a distribution function that returns probabilities $X$ being greater than or equal to some value $x$, i.e., $$Pr(≥)=()$$ ?
When learning about Regularization in Regression, I am used to seeing this in the following form (https://en.wikipedia.org/wiki/Regularization_(mathematics)): When watching this video (https://www.youtube.com/watch?v=0nYiGXooG4I), I see a similar equation as provided above: The thing which I don't understand is that ...
I am an MBA Student taking courses in statistics. We had this discussion today in our class. Suppose we have a large dataset that contains the "Age Group" and "Gender" of people within a country and if they have some specific "Disease or Not". Using this data, by filtering on different subsets, we calculate that: Supp...
I am training a Mixture Density Network (MDN) to map from continuous input vectors X to continuous targets Y [i.e. X -> Y]. There are missing labels on vector Yi, which I impute from the mdn (as below). If Yi is conditionally dependent on Y2, does this improve estimates on Yi? neglogloss = -MDN.log_prob( tf.where( tf.m...
I am looking into calculating distances between vectors for some data analysis. One question I have is whether I should use actual count data or convert to discrete probabilities. For some distances, the method is clear from the underlying theory (e.g. the Hellinger Distance). However, for other distances, which appr...
You are given three coins with the following probabilities of observing a Head when tossed: Coin 1 has a P(H) = 1/2, Coin 2 has a P(H) = 1/3, Coin 3 has a P(H) = 1/4. You observed two heads among three tosses, and you would like to find which coin the observations come from. What is the Maximum Likelihood Estimator for...
I have an overdetermined system of equations problem where n >> m and the OLS almost always finds an approximation instead of an exact solution. I already reduce the problem space from A to a lot smaller matrix A' using an algorithm based on domain knowledge but it is still not enough. The idea is to employ a regulariz...
(Sorry if talk in layman terms) Consider this you have 2 groups of populations. Let's assume we measure intelligence here. Let's assume the distributions are perfectly normal. One group is centered around 100 iq. Second group is centered around 120 iq. Now suppose first group is way larger than second group. To a point...
I am studying the cointegration between retail prices of pork. In an economical theory this should have a positive relationship. However, when I tested for cointegration using Johansen in Eviews, it only appears to be cointegrated at Case 4 and 5 where there is a linear trend in the cointegrating equation. When I tried...
[ I asked this earlier on DS SE: here but the question didn't receive sufficient attention there. I ask it here because I'm looking for a practical answer with some theoretical justification. ] I have a large dataset $D_1$. I have a Feed-forward deep Neural Network $N$, with hidden layers, that I trained on $D_1$, us...
I am a relatively inexperienced R user and is a newbie here. I would like to ask for your advice regarding how to plot a three-way interaction graph in R. My mixed effects regression model looks like this: model1 <- lmer(score ~ TaskType * Language * Time + VocabSize + (1|ID), data= vocabtestscore) TaskType is binary ...
Hi i am actually not an actuary but I'm currently working on an ML project on insurance pricing. The pricing is calculated by multiplying Claim Frequency and Severity, correct? I'm currently using Poisson GLM to predict the Claim Frequency, using Exposure as the offset, the data I have in hand is historical claim data ...
I am modelling a linear regression of two retail prices. Correlation shows a positive relationship. When I regressed it with each other, it showed a positive coefficient. However, when I added a trend variable to, it was significant but the regression coefficient becomes negative. How did this happen?[
I am new to statistics and find the following procedure unnatural and arbitrary. Could someone point out what I miss, and how I should be thinking? Assumptions I have two vectors of real numbers $x_{i}$ and $x'_{i}$ with length $N$, and I assume that they are respectively sampled from one-dimensional normal distributio...
What EXACTLY do percentiles (/does which) mean, how are they distributed exactly (equally/weighed)?
I had this question when reading section 3.5.3 on page 170 of "Pattern Recognition and Machine Learning" written by Christopher M. Bishop: Here $\mathbf\Phi$ represents the design matrix and $\beta$ is precision which is positive. My question is: why is $\mathbf\Phi^\top\mathbf\Phi$ a positive definite matrix? I tried...
I have an extremely skewed data with these info: Population: 25129 skewness: 3.336996478307211 kurtosis: 84.24134797666636 Min: 0.0 Mode: 5500.0 Median: 11300.0 Mean: 12226.218104649015 Max: 245540.0 What is the best way to determine the number of samples, and how to sample this? And please make it simple cause i'm a ...
Is there a way to perform Discriminant Analysis when your data is not normally distributed and the covariance matrices are not equal?
My dataset consists of 950k unique loan observations over the period of 4 months. The institution is international, so it has some observations from different countries (not panel data). I am studying the relationship between interest rates and a unique independent variable X. However, I want to control for macroeconom...
I am an MBA student taking courses in statistics. Recently, I posted a question (Can "Pooled Averages" be considered as "Better" compared to "Individual Averages"?) in which I asked if averaging different averages together can improve the quality of an estimate. Now, I have a slightly modified version of this question....
in the model below, can I say that 2021 G2 is not significant because it is calculated from a non-significant interaction ? These are my variables: CONT_Y = scores YEAR = A/B (2020 or 2021) MY_GROUP = test1 (G1) or test2 (G2) I have this model: Y ~ MY_GROUP * YEAR modInteraction <- lmer(Y ~ MY_GROUP * YEAR + (1|...
I apply 2 different machine learning models in my data, a Multiple Linear Regression and Random Forest. The results were bellow: Why the MAE and RMSE are higher for a higher R-squared? Both models were tested in the same test set but with different input varibales
Assume I have some distribution $p(x)$ that is constrained to some closed and bounded region in $R^n$. I would like to have some way of sampling from some distribution $q(x)$ such that $q(x)$ is high in regions where $p(x)$ is low and the inverse is true. Any ideas on how to do this? Thank you in advance :)