instruction
stringlengths
9
38.7k
This issue may be a little trivial, but I really want to get some inspiration. I know the formula of logistic regression, but have no idea how it is deduced. How can I deduce this formula from more basic math theory? Is this the best function to fit binary classification? $$\frac{p(x)}{1-p(x)}=e^{\beta_0+\beta_1 x}.$$
I need to classift a dataset with 3 classes: A - 85% of the data B - 10% of the data C - 5% of the data Where C is a subset of B. What should be the best way to approach it?
Have been researching tests for normality, and have some idea of how some of these tests work from Wikipedia. However, they leave out explaining the distributions of the test statistics under the null and simply tell you to reject the null for certain critical values. Could someone enlighten me? Is there any distributi...
I have built a multiple regression and estimated it using OLS. All the variables are significant. One of the coefficients is close to zero (around 0.0003) with a significant p-value of 0.01. How to interpret that?
I have a logistic regression model used in credit scoring and I am studying the metrics used in the credit scoring field to evaluate the quality of the model. My ultimate objective is to understand if the same metrics could work in other ML models, for example a random forest. Based on what I have read, I think this is...
Suppose I have a large training sample, say a million observations, and want to perform regression with a large ReLU-activated neural network (both deep and wide, with many times more parameters than the sample size). In principle, it should be possible to interpolate the training data and achieve perfect performance (...
Since my residuals failed the test for heteroscedasticity and autocorrelation, what is the benefit of using Newey-West when there is no impact on the coefficient estimates in OLS? Does the Newey-West make any impact on the OLS model? Should I use GLS instead of OLS due to heteroscedasticity and autocorrelation?
I'm trying to solve this problem: Let $X$ be a single sample from Geo($p$) where $p ∈ (0, 1)$. Find a minimax estimator for $p$ under the loss $L(p, δ(x)) = (p−δ(x))^2/ p(1−p)$ . I'm trying to put different priors for $p$ and find one with constant risk. Because we know Bayesian estimator with constant risk is minima...
Section 7.3 of Elements of Statistical Learning (2nd edition) gives the bias-variance decomposition for OLS prediction first for a single input $x_0$, and then averaged over a set of inputs $x_1, \dots, x_N$. I understand where the variance term $||h(x_0)||^2 \sigma_{\varepsilon}^2$ in equation 7.11 comes from, since w...
I am looking for a way to check if there is a significant difference between mortality of egg embryos across three groups (DYF1- double yolk with one embryo; DYF2 - double yolk with two embryos; CONTROL - normal egg (one yolk and one embryo). Mortality rate in my study is divided into 3 stages: EARLY (1-7day), MID (8-1...
I have gotten R Wilcox test results I do not understand. Comparing two non-Normal independent sets of ~500 ages. The p-value ~.17 but results is "alternative hypothesis: true location shift is not equal to 0". I suspect I must be missing something.
I have an experiment where I am looking at species-specific responses to a treatment application. Within each species, I have 3 genotypes, arbitrarily chosen to ensure we aren't detecting genotype-specific affects that get attributed to species. Each genotype has a number of replicates within it. Thus, specific genotyp...
Problem. Given $X_1,X_2,X_3$ a random sample from the Bernoulli distribution with success $\theta$, show that the statistic $T= X_1+2X_2+3X_3$ is not sufficient. My attempt When I try to apply the factorization criterion I don't see this function inside the likelihood so I guess $T$ is not sufficient. However, I feel u...
I'm trying to find out a model that adequately describes effects of gender and length on food choice. For gender; 0=Male and 1=Female, length; 0=Subadult 1=Adult, Choice; F=Fish I=Invertebrates and O=Others. Here is my data; data3 <- data.frame( gender = c(0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...
Is it possible to get the label names from an sklearn SGDClassifier model that is loaded from a pickle file? model = pickle.load(open("saved_model.pkl", 'rb')) y_pred = model.predict(x) Because all the labels may not be present in the input vector, x, how can I know what the possible labels are?
Motivating Question I was fitting some models in R and recalled that significance terms are shown for random effects in the mgcv package for Generalized Additive Mixed Models (GAMMs), but this is not provided in the summary fit for Generalized Linear Mixed Models (GLMMs) in the lmerTest package, despite having signific...
I read an unpublished paper. There is a regression model with about 20 covariates. The authors use a stepwise variable selection method and come to a model with two covariates with small p-values. The question is: is it correct to consider models with only 2 covariates out of 20? Even for models with all covariates bei...
A prior for what? Let's take a toy example of a Deep Neural Network with weights w being fit on a dataset D with an L2/Mean Square Error loss. I looked up Maximum Likelihood Estimation (MLE) and Maximum a Posteriori Estimation (MAP) regarding the regularization and I think I have some vague intuition: Take 1: The use o...
So I have a dataset which has 84 rows and 18 predictors. I need to predict Annual_salary based on the data provided. I did create a model after changing all the categorical variables to factors. Then I used olsrr package to get best subset and got it to be around 7 predictors. Using those predictors I created a model ...
I'm trying to calculate manual forecast of dataset using python generated ARIMA(2,1,1) coefficients for small testing dataset that contain 10 points. Python gives me AR1 -1.293, AR2 -0.901, MA1 0.9998, and sigma 174.936. Without constant. So, forecasting for 1 period should be yt = series[9] + ar1*(series[9]-seri...
I have a quadratic population model of the form: $y=\beta_0+\beta_1x_1+\beta_2x_2+\beta_3x_1^2+\mu$ I want to test if $x_1$ has a positive partial effect on $y$. How can I run such a hypothesis test taking into account both the linear and the quadratic component of $x_1$?
I have a dataset of 153 observations and 84 variables. The dataset is processed for a classification issue. Observation are three time repeated measures of radiomics in 3 different regions of a soft tissu component in the same patient. By the 84 variables, there is 53 radiomic parameters and 31 clinic parameters. Three...
This question is a continuation of this question: Derivation of Box-Cox and Yeo-Johnson Log-Likelihood Functions. In order to derive the maximum lambda value in log-likelihood objective function for both Box-Cox and Yeo-Johnson power transformation, the Scikit-Learn PowerTransformer implementation uses Brent method (op...
If I have a set of data points and they do not take up the form of a symmetric distribution when i plot them as a histogram. Then, can I calculate the mean and standard deviation from their usual formulae? Can I take the standard deviation so calculated to be the uncertainty of that measured quantity even though the sp...
I fitted a regression tree using rpart function. The summary of this model is provided below. I need to know how to calculate the decrease in impurity in each node. For example, in the node number 1, how to obtain improve=0.27435110? What about improve=0.14323610 in the node number 2? Code: library(ISLR) set.seed(12345...
I have a classification model that is trained to predict the probability of approve/reject on an object, and we use the output of the final sigmoid as our final score to rank these object. These objects have a high number of dimensions, so when a user rejects an object, we also ask for explicit reason why it was reject...
I have found from previous data that men and women differ significantly in the way that they interact with my variables. I now want to make a regression model trying to ascertain the interactions between my dependent and independent variables and then compare the regressional weights and effect sizes on the basis of ge...
Let's say, I want to establish a relation between the distribution of $Y$ and $p$ covariates. I denote the covariates with $x_1,x_2,...,x_p$. Then, I denote the linear predictor with $\eta$ , where $\eta = \beta_0 + \beta_1 x_1 + ~... ~+\beta_p x_p$ . Thus, $E \left[Y|X \right]=\mu$, which is connected with the linear ...
I'm doing test for set a data and a statement appears true mean is not equal to 0 What does it mean? t.test(Spread.sheet.VNV.Height$Height..CM.2,conf.level = .90) One Sample t-test data: Spread.sheet.VNV.Height$Height..CM.2 t = 11.648, df = 31, p-value = 7.432e-13 alternative hypothesis: true mean is not equal...
When comparing between two populations, or two groups from the same population, a t-test assumes that both those groups have the same variance. However, a t-test works by using the pooled variance calculation, which is calculated by: $$s^2_p= \frac{(n_1-1)s_1^2 +(n_2-1)s_2^2 }{n_1+n_2-2};$$ $s_1$ and $s_2$ should be th...
I don't know how to obtain the autocovariance function of the following process, having a multiplication makes it difficult for me. $X_t = Z_t + \theta Z_tZ_{t-1}$ with $Z_i \sim N(0, \sigma^2)$ (white noise) pd: the answer is: $\gamma_X(k) = \sigma^2(1+\theta\sigma^2), \hspace{1cm} k = 0$
I read Non-parametric test if two samples are drawn from the same distribution and have tried permutation test, KS test The issue is I have data of different sample size that are collected from the same subject, hence dependent. Eg. Condition A: 180 samples Condition B'0: 23 samples, Condition B'1: 30 samples Condition...
I'm currently reading "All of statistics" by Larry A. Wasserman. In the chapter on statistical decision theory, we are given the following example: Consider the Bernoulli model with loss function $L(p,\hat{p})=\frac{(p-\hat{p})^2}{p(1-p)}$. It can be shown that for this loss function, $\hat{p}(X^n)=\frac{\sum_{i=1}^n ...
So I have a dataset with 4 distinct groups, and I am trying to see if there is a difference between these groups on a dependent variable Y which is cardiorespiratory fitness. I did an ANCOVA and added gender and age as covariates to control for them. In my ouptut, I get: Df Sum Sq Mean Sq F value Pr(>F) ...
I'm currently doing a master's in mathematics, and I'm interested in spatial statistics, mainly for a project. Unfortunately, it seems impossible to find lecture notes on this topic. I have seen some books like Cressie's, but they are a bit overwhelming for an introductory purpose. What I aim to know is the basic conce...
In Marketing Media Mix models, adstock transformations are commonly seen in advertising variables. However, in other domains where the regression tool is intended to estimate the effect of variables on the output variable, for example price elasticity and demand, when several variables are incorporated, does adstock tr...
Let's say the kernel density estimator is given by $\hat f(x) = \frac{1}{nh_n} \sum_{i=1}^n K(\frac{X_i-x}{h_n})$, where $h_n \to 0$, $nh_n \to \infty$, $K$ a symmetric probability distribution function with finite variance, and $\int K^2 < \infty$, and the true pdf $f$ is such that $f''$ is bounded and continuous (And...
Suppose I am given a table of the life expectancies, $e_x$, for ages, $x$, ranging from 0 to 100. Is the following way of calculating the probability, $p_{(x\rightarrow x+1)}$, of surviving from one year to the next valid? My approach is based on the following picture: Starting at $x=5$, the survival rate is 0%, so $e...
I have two random groups of participants each asked the same framing question, one group in a positive and one group in a negative manner. How do I test my data for normality and hence decide what test to run in SPSS? I am thinking either an independent $t$-test if normally distributed or a $u$-test if not.
I am wondering if the loglog curve and the Cox zph test are different then what should I choose? I am working on the cgd data set. I conclude that the sex is time dependent from loglog plot but is not time dependent on zph. One reason I could think of is that the sex are of different sizes, that is, male is around 35 b...
I performed pptest in R for corn variables and am unsure how to decipher the p-value and what that means for the hypothesis.
I am not sure whether I should put my question here or stack overflow. Please let me know if I am wrong. I am trying to generate serially correlated error terms such as $e_t = \rho * e_{t-1} + v_t$ where $v_t\sim N(0, \sigma^2)$ follows normal distribution with zero mean and constant variance. I found the following cod...
I have the density function: $P_Y(y) = \sqrt{\frac{1}{2\pi y^3}} \exp\left(-\frac{(y-\mu)^2}{2\mu^2y}\right)$ If we define $r := \mu^2$ what is its asymptotic distribution? The right answer is $\sqrt{n}(\hat{r} - r) \sim N(0, 4r^{5/2})$ but I don't understand how i should get there. I know that $E[Y] = \mu$ and $V[Y] =...
Once I've plotted the survival rate distribution(s) for, let's say, heart failure patients, Are survival rates applicable to ANY new person coming in and simply being predicted based on the day they were measured (time)?
I've been surfing Cross Validated trying to find an answer to this question of mine, and I've found these posts: Standard deviation of mean of a set of numbers, which are imprecise, Standard deviation of several measurements with uncertainties, and How would I compute the standard deviation of data with errors?. I'm no...
I have the negative binomial distribution and want to find the fisher information: $I(\theta) = V[\ell'(\theta)]$ How do i calculate this? I know that the derivative of the log-likelihood is: $\ell'(\theta) = \frac{r}{\theta} - \frac{X - r}{1 - \theta}$ Also i know that $V[\ell'(\theta)] = \frac{V[X]}{(1-\theta)^2}$, b...
Let's say I know the population standard deviation, but the sample size is small (≤30). Can I use the z-test? The reason I ask is that I see two different statements. We can use the z-test, if we know the population standard deviation AND the sample size is >30. As long as we know the population standard deviation, we...
Let $b$ denote the OLS estimator, and assuming normality of the errors we get $b \sim \mathop{\mathcal N}\left(\beta, \sigma^2\left(X'X\right)^{-1}\right)$, where $X\in\mathbb R^{N\times K}$ is of full column rank $K$. Now, for $R\in\mathbb R^{J\times K}$ with $J\leq K$ it must be$$Rb\sim \mathop{\mathcal N}\left(R\bet...
Say I’m interested in running an experiment. I want to see if student using collaborative techniques (say we pick one random technique) affects test scores. So, obviously the null hypothesis is that there is no change in test scores and the alternative hypothesis is that there is some significant change from employing ...
Imagine a hypothetical situation: According to an electoral poll, presidential candidate A has 65% of votes among women; This same pool showed, in the state stratification, that this candidate has 40% of the votes in California; When stratified by salary range, this candidate has 70% of the votes among those earning be...
In this post about diffusion models, IIUC, we want to use a neural network to approximate the mean of the reverse diffusion: $p_\theta(\mathbf{x}_{t-1} \vert \mathbf{x}_t) = \mathcal{N}(\mathbf{x}_{t-1}; \boldsymbol{\mu}_\theta(\mathbf{x}_t, t), \boldsymbol{\Sigma}_\theta(\mathbf{x}_t, t))$. That is, we train a neural ...
I am conducting a meta-analysis of individual studies that report probabilities and their standard error as an effect size. I plan to convert the probabilities and standard errors to the natural logarithm of the odds, however, I am not sure how to convert the standard errors of the probabilities into SEs of the natural...
Let's say the kernel density estimator is given by $$\hat f(x) = \frac{1}{nh_n} \sum_{i=1}^n K\left(\frac{X_i-x}{h_n}\right),$$ where $h_n \to 0$, $nh_n \to \infty$, $K$ a symmetric probability distribution function with finite variance, and $\int K^2 < \infty$, and the true pdf $f$ is such that $f'$(instead of $f''$) ...
I am trying to compare intervals for two sets of data. I have $N$ pairs of intervals, where each pair has an interval corresponding to treatment $A$ and then treatment $B$. For example, in the $i$-th pair, I have $$ (CI^{A}_i, CI^{B}_i) $$ I would like to compare these visually. An idea that comes to find is a type of ...
I read this article and am wondering why we can reconstruct Cartesian coordinates from a Gram matrix generated by taking dot product of the distance from the origin. They had a Euclidean distance matrix. They generated a Gram matrix by $$G=-\frac12(D-1d_1^\top-d_11^\top).$$ Then, an eigenvalue decomposition is conduct...
I am facing a Lasso-type optimization problem with some tuning parameters for the L1 penalty term. I am wondering if there is any method (apart from cross-validation) to determine the values of those hyperparameters directly. A rough estimate from the data or even a rule of thumb will be more than enough for me. The re...
Consider this plot of the $F_\beta$ score for different values of $\beta$. I have a hard time getting an intuition as to why they intersect at a same point. (Cf. this blog post.) In other words, why would there be a threshold of about 0.15 that yields the same $F_\beta$ score regardless of the relative importance given...
I have a number of independent observed sequences that I believe are generated by same underlying process. Is it possible to extend linear autoregression and learn the optimal transition matrix for multiple sequences? I'll explain my approach. I'll start with autoregression for a single sequence. I observe a sequence o...
The CLT defined in Introduction to Mathematical Statistics (Hogg) 8th ed., states that given the samples $\mathbf X\sim\mathcal N(\mu,\sigma) $ with the mean and variance estimator $\bar X,S^2$, the following holds: $$ \frac{\bar X-\mu}{S/\sqrt n}\sim \mathcal N(0,1) $$as $n\to \infty$. Now, an example in the book stat...
i have a large dataset (~3,000 datapoints, 6H interval) on Twitter and Bitcoin Data and try to estimate the effect of tweets on price changes / trading volume of Bitcoin. Therefore, i run a VAR model with 3 lags as a result of ACFs and AIC/BIC and get the following output: Estimation results for equation TradingV: ===...
I want to estimate the recall of a binary classifier. I have a dataset of ~1B examples but I don't know the ground truth, the only thing I know is that positives are extremely rare. I can randomly sample let's say 1000 examples and assign a ground truth manually (a very expensive and time-consuming process). Given how ...
I'm coding in R. For my current project, I'm looking at data from OECD countries, and want to control for education level. The dataset has three relevant variables, that each describe % of population in a given country in a given year that has attained primary, secondary and tertiary education (e.g. UK, 1987, 30% compl...
I'm training an OCR model for a non-Latin language with 40 chars. I'll need to combine English at some point which will require some changes to the Architecture and training from scratch. Would it be possible to add the set of all characters to the softmax(English chars and the other language chars) when training witho...
I have been using shap values as a measure of feature importance for some time. But, I have never understood the justification behind comparing the shap values for features that are on different scales. Shap values represent the average change in the prediction if the feature changes by 1 unit. But, what if one of my f...
I am having a very weird behaviour when performing constrained RDA. The hypothesis I am testing is: is there a difference between treated and control samples? The experimental design comprise 10 sites, where a control and a treatment were sampled. As far as I understand, this is the classical example of random effects ...
I am dealing with cross sectional data that has groups within the observations. For example, the dataset of an online firm registered in one country that allows multiple banks from different countries to sell the loans originated on their platforms. Each row in the dataset is one observation (one loan) with several cha...
I'm looking for some expert opinion on what to expect when using the output from model A (probabilities) as input into model B. I have a population where all instances have been assigned a probability from model A. I checked how the model has performed over time using the actual data from target variable and got a roc ...
I have a water quality sensor which is measuring various parameters every hour for one year in the same location. I would like to analyse the relationship between each of these parameters and determine whether it is significant over the time series, would a GLM be appropriate for this or not given the potential interde...
The variable $T$ is given by the classic form of the one-sample t-test the population mean under a hypothesis such as $H_0: \mu = \mu_0$ $$T = \frac{\bar{X_n}-\mu_0}{S/\sqrt{n}}$$ where $\bar{X_n} = \sum_{i=1}^n X_i$ and $S = \sqrt{\frac{1}{n-1}\sum_{i=1}^n (X_i - \mu)}$ and where $X_i$ follows some distribution with p...
I wish to receive a clear and concise answer as to what is being modeled for a gamma distribution with non-integer shape parameter, and a more detailed derivation of its distribution function for all positive numbers (rather than simply integers). I have derived the gamma distribution as the sum of $n \in \{0, 1, 2, .....
Consider an ML Model that is trained to classify between two classes of elements. This particular classifier has consistently (must be consistent for the following conversion to take place) poor performance, say 30%. Does flipping the output of this classifier result in a 70% accuracy classifier?
As the title suggests, what is it about the nature of GAMs that make them so popular in ecology? Is it their ability to model latent variables? If so, why wouldn't they be more universally popular, since everything is affected by more than meets the eye.
I have some issues with the interpretation of the output of my cross-lagged-model. First things first. Here is the model: ' us_t1a =~ opin_t1 + exp_t1 + know_t1 + free_t1 + curi_t1 us_t2a =~ opin_t2 + exp_t2 + know_t2 + free_t2 + curi_t2 us_t3a =~ opin_t3 + exp_t3 + know_t3 + free_t3 + curi_t3 us_t4a =~ opin_t4 + ...
I have some time-series data sets in which, in principle, two types of event are possible: the signal can instantaneously jump up or down; or there can be a gradual decrease in the signal. I want to detect the regions featuring only the gradual decreases, without detecting the large jumps in signal strength. Below is a...
data: conflict$Livestock_density and conflict$Forest_density S = 1e+08, p-value = 0.04 alternative hypothesis: true rho is not equal to 0 sample estimates: rho -0.0694 Does $\hat{\rho} = -0.0694$ mean I should interpret test as not providing evidence of association, even though I have a low p-value?
I know that feature scaling is always a requirement for clustering algorithms. Currently I am implementing hierarchal clustering on this dataset, I will use only the annual income and the spending rate features. Now I am confused of whether to use feature scaling here, this is because both features approximately have t...
I want to use the Kalman filter to sense the state of a machine. The machine could be either working or damaged. I'm trying to infer the probability of the machine working, given observations from multiple independent sensors. I'm able to formulate the problem using Bayes' Filter (discrete formulation). I'm curious to ...
This is very basic, but I want to clarify the MSE in a vector-valued setting. Given observations $$ \begin{bmatrix} [x_1, y_1,z_1] \\ \vdots \\ [x_n, y_n,z_n] \end{bmatrix} $$ And estimations $$ \begin{bmatrix} [\hat{x_1}, \hat{y_1},\hat{z_1}] \\ \vdots \\ [\hat{x_n}, \hat{y_n},\hat{z_n}] \end{bmatrix} $$ The MSE shoul...
I'm facing the following problem. I think I have it formulated right, but unsure how to proceed. Here is the problem statement. Assume there are $N$ users. For each user, I've an estimated probability that they would take an action. Call this $1- p_i$. Now the $p_i$ is a p-value, an output from a hypothesis test, that ...
Have these results but not sure how to interpret them to pick the best fitting model, I think the high p value suggests I should go with model 1? Also in terms of the order that I put the models in, which model is nested?
Goal Given a curve defined by a set of (x, y) coordinates with linear interpolation, we want to find the best approximation using a smaller set of points (w/ linear interpolation) that fall along a predefined grid. The number of points and the grid are chosen up front and are static. The following invariants must be he...
In this paper: https://www.tandfonline.com/doi/pdf/10.1080/02664763.2021.1940109, the authors have two actual datasets (e.g., 59 observations showing continuous annual flood data) and the authors want to fit it with a Gumbel distribution. The authors say that "it is important to first have an idea of the underlying di...
I have a linear regression model which is: inhibition ~ age + VO2max + sport_class + VO2max * sport_class where VO2max is a continuous variable, and sport_class is a 4 group categorical variable (close, open, mixed, none). I am interested in the interaction between these two variables. Having done a stepwise regressio...
Is this an example of interaction plot? However, in the bottom of the article it is wrtitten, that it's not a 3-way-interaction (link to article). How should I understooth it? If it's not a 3-way-interaction plot then how can it been done in R? library(MASS) library(effects) wvs.2 <- polr(poverty ~ country*(gender + r...
What are the problems if you estimate a linear regression model using OLS, when the dependent is a dummy ? What Models are used to overcome it
This question concerns the standard setting for applying Fano's inequality to derive minimax bounds for a parameter estimation problem. The goal is to estimate a parameter described by a random variable $X$ taking values $x \in \mathcal{X}$, where the set of possible parameters has bounded size, $|\mathcal{X}| = M$. I ...
I want to see if there is a relationship between if someone bought a grocery store item and the time of day? For example, is there a relationship between when someone bought an apple and the time of day? Or when someone bought meat and the time of day? > dput(df) structure(list(Apple_Bought = c(0L, 1L, 1L, 0L, 1L, 1L, ...
Suppose the functions $f_1\sim\mathcal{GP}(m_1,K_1)$ and $f_2\sim\mathcal{GP}(m_2,K_2)$ are drawn from independent Gaussian Processes, and let $$f=f_1+f_2.$$ Then $$f\sim\mathcal{GP}(m,K)$$ where $m=m_1+m_2$ and $K=K_1+K_2$. In Gaussian Process regression, the predictive distribution for test inputs $X^{\star}$ becomes...
Correlation between errors and hetereoskadacity typically come up with regression, but can these same concepts come into play with the sample mean? I know hetereoskadacity itself does not make sense since it is about conditional variances, but I could think of each X$_i$ having its own variance, and that within sum sub...
I am analyzing complex survey data and I want to draw restricted cubic spline with OR. I have learnt how to draw restricted cubic spline with logistics regression, but Y-axis of the figure is probability of outcome event=1 and I want OR to be Y-axis. I attached my code in R below, hoping to get your help. Any tips will...
It is increasingly common to employ regression with post-stratification. Since probability-weighting is incoherent in Bayesian inference (thus why sampling/survey weights and weighted psuedo-likelihoods are not used), post-stratification is used to infer treatment effects for populations known to differ from one's samp...
I assume that X and Y are normally distributed with individual mean and variance. So far, I have found that an analytic expression exists for $E[X^2+Y^2]$, $E[X^2*Y^2]$ and $E[X^2*(X^2+Y^2)]$, all using the theory of quadratic forms Quadratic forms in random variables. However, I really can't find one for $E\left[\frac...
While running a GAM (Generalized Additive Model), I noticed that using select=TRUE inside mgcv:gam I get different df from logLik.gam than not using it. What is the actual reason behind it? I need to compare the df form different model. In this purpose should I use select=TRUE or not? Any suggestions is really apprecia...
The MH algorithm essentially involves generating a sample destination state from a proposal distribution, computing the acceptance probability as a function of that sample, and checking whether a uniform random variable is above the acceptance probability to determine whether to move to the new state or not. What is t...
Lets say I have the following data. The Above is the observed data for event A, B, and C. And the above is the predicted data for event A, B, and C. Objective is to compare how my predicted data distribution is close to the observed data distribution for the same event. The observed data has very high variance by nat...
Suppose I have a dataset in which I am trying to model "asthma prevalence" using explanatory variables such as "age", "profession" and "geographical location" using a regression model. Currently, I have the "geographical location" variable as a categorical variable (e.g. the City code in which each person lives). id p...
Suppose we have two binary classifiers based on deep learning. The second classifier is able to tell me with a probability not very high but better than a random guess (let's say 70%), if the prediction of the first classifier is correct (but not which is the correct label). Therefore, given an unlabeled data set, how ...
This is my first time using a machine learning algorithm. It is for a school project. My model is attempting to predict from inputs: Weight, Height, and Age whether an Olympic athlete (100-meter dash) wins a medal or not. Here is the relevant code: #Normalize the data train_athletics_m = min_max_normalization(train_ath...
Say I have the following dataset Y X1_v1 X1_v2 5 3 54 -2.3 2 32 4 -6 12 3 2 23 88 4 22.4 -230 0.3 55 If I run a simple regression of Y on X1_v1, I get the following results Now, I run another regression of Y on X1_v2, I get the following: What I want to do is to make the...
I have come across a code that predicted the winner of the World Cup using the Poisson distribution. Does this have any logic? is it reasonable? Searching the internet I have not found any reliable reference site that could support this theory. the code does the following: Here comes a part of Data Engineering that is...