instruction
stringlengths
9
38.7k
For a model, $y = \beta_0 + \beta_1 x + \epsilon$, does the variance for $\hat{\beta_0}$ and $\hat{\beta_1}$ always decrease when more datapoints are added? I've decuded the variance expressions as: \begin{equation} Var[\hat{\beta_0}] = \sigma^2 (\frac{1}{n} + \frac{\bar{x}^2}{S_{xx}}), \end{equation} and \begin{equati...
Suppose we have three variables: X1, X2, and Y. X1 and X2 are the independent variables (IVs) and Y is the dependent variable (DV). Suppose that each IV is positively associated with the DV. Suppose also that each IV is positively associated with the other IV. In other words, X1, X2 and Y are all positively associated....
The question is about the practical use of polynomial regression. Let's say there is a dataset with columns A, B, T where T is a dependent variable, A and B are independent variables. A and B contain missing values. I want to fill in the gaps with the mean, then normalize values by the formula: (x - u) / s, where u is ...
I am building a ML model that uses the OC-SVM for anomaly detection. For our cost function we require the alphas obtained from the OC-SVM. We use the OC-SVM of scikit-learn, which I assume is based on libsvm (as it is stated that this is the case for sklearn.svm.SVC). Now to obtain the alphas, I followed the suggestion...
Does there exist a technique, such that while computing the returns of multi-armed bandits, we have the possibility of introducing an extra bandit? If the number of bandits was fixed, we could directly apply the Thompson Sampling (TS_ algorithm) to it. Maybe a variant of TS exists that could take in as input a variable...
As far as I have read, Sequential Gaussian Simulation always uses Simple Kriging. Is there any chance that it uses Ordinary Kriging?
I don't understand why there is the need to flip filters when using convolutional neural networks. According to the lasagne documentation, flip_filters : bool (default: True) Whether to flip the filters before sliding them over the input, performing a convolution (this is the default), or not to flip them and perform ...
I would like to obtain the p-value of the random effect for a simple linear mixed effect model. To be more precise, my model is: $$\mathbf{y}=\mathbf{X}\boldsymbol{\beta}+\mathbf{Z}\mathbf{u}+\boldsymbol{\epsilon} $$, where $\boldsymbol{\epsilon}\sim \mathcal{N}(0,\sigma \mathbf{I}_n)$ and $\mathbf{u}\sim\mathcal{N}(0,...
I want to examine 2 variables of experience: A. Regular practice - hours. B. Formal practice - days. Both variables are right-skewed, with extreme outliers (Experts) and many subjects with zero experience (none experience). I want to calculate Pearson correlation between these 2 variables and others variables in my stu...
Given an i.i.d. sample of 36 integers: [6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6] A bootstrap resampling procedure is performed to build 9,999 bootstraps of length 36 Lower and upper quantiles at 0.025 and 0.975 are then computed for each bootstrap usin...
I have run a linear model to test for a relationship between two continuous traits in a sample of 50 taxa. I'm using the packages phylolm and caper in R (just to check they tell me the same thing, which they do). I noticed there are different options for fitting the models (e.g. Brownian motion (BM), Pagel's lambda (λ)...
In the credit risk industry (and finance industry as a whole, at least here in the UK), there is a very common and accepted 'proper' way to build scorecards. The general framework seems to be: Binning your predictors, merging neighboring bins with similar Weight of Evidence (WOE) values, generally aiming for a monoton...
I was talking with someone much more experienced in stats than I am and they suggested the use of Monte Carlo Tree Search for a problem I am facing. Problem Statement: I am collecting jitter measurements from an IC. there are 4 settings which control jitter. The output jitter is stochastic. So if I try settings [x,y,z,...
A few quick definitions: An error is the difference between an observed value and the "true" value A residual is the difference between an observed value and the "predicted" value Let's say we have three samples and want to conduct a 1-way ANOVA: $$H_0: \mu_1 = \mu_2 = \mu_3 = \mu$$ In order words, our null hypoth...
Consider the following data (I put the data as a table in the bottom of this question.) These data are in two groups, blue and orange. In each group there is a positive relationship, while pooling across groups, there is a negative relationship. So there is Simpson's paradox. (In my application, the two groups blue an...
I have seen these two terms in practice. Are they actually referring to the same method? If not, what is the main difference between the two methods? Conditional logistic regression is commonly used in case control studies, where matched case and control subjects are compared using this model adjusted for matching cova...
working through Peter McCullagh's glm book and having a hard time with understanding quasi-likelihood. I'm working on this question below and I think I need to find the quasi-likelihood estimates and then use a wald or score test? I'm very lost.
this will be on my exam and i'm indignation to have such confusing/vague questions "validating" my results (explaining me why it is not "confusing/vague" and make me look like a fool would be appreciated, that I can forget in one day, not having a clear answer to the question at matter, hasn't let me sleep weell in 3 d...
This is about upper bounding Rademacher complexity by Gaussian complexity but I am only asking about a step in the proof and the actual question is not so important. A similar question was asked before about Exercise 5.5b here. I can mostly do the proof by following the outline the instructor provided but there is one ...
Based on my understanding, we could determine whether or not to include ARCH effects, by checking the residuals of the mean corrected model (EX: ARMA model). I know the difference between GARCH effects and ARCH effects. But I am having a difficult time to understand how to determine whether we need to use GARCH effect...
I have a long series of entities: x1, x2, x3, ... xn for each of which, there is a probability of an event occurring. The probability for each x may be different, but they are all independent, and they are all known: p1, p2, p3, ... pn I might provide a point-estimate for how many of said event occurred in that series ...
I have a large dataset containing about 20,000 individuals. Among them, there are about 200 people classified as disease group and the remaining 19,800 classified as normal controls. I want to do 1:1 age and gender matching between the disease group and control group. However, it is obvious that control group far outnu...
Suppose that $X_1,\dots,X_n$ are iid from the normal location model $N(\theta,1)$ and we wish to estimate the critical or cutoff value $g_{a}(\theta)=P(X_1\le a)$, where $a\in R$ is some fixed number. (a) Let $\Phi$ denote the CDF of the standard normal distribution. Show that the estimator $$ \delta_n(X)=\Phi(\sqrt{\f...
Context I'm trying to solve a black-box optimization problem, and I can "reformulate" parts of the problem is different ways that may lead to lower or higher costs, and which can interact between themselves. Currently I have 8 parameters I can control, 7 of which have 3 different approaches and 1 which has 2 different ...
I am trying to aggregate data for testing for multiple data sets. It is unrealistic to load the entire data set (which is composed of multiple subsets of varying length) into memory to calculate a median. As one solution to my problem, I thought I could find the median of each subset of data, along with the sample size...
I would like to know what classification methods can naturally deal with only nominal attributes. An example is decision trees created by C4.5. I imagine that other classifiers based on decision trees and rule sets can also be used. Apart from these kinds of algorithms, are there others that follow different approache...
I was doing multi-class text classification task and I built 2 models, one LSTM model that trains from scratch and other LSTM model with fixed pretrained word embedding. Fixing the pretrained word embedding gives lower accuracy than training from scratch on both the validation and training data. What is the reason behi...
Given a sample $(1,2,5,2.5,3,7)$, and known $\sigma^2 = 4$ with possible values for prior mean of $(0,0.5,1,1.5)$ all equally likely, find the posterior distribution and the posterior probability that $\mu\leq 1$ So in R I have: > sample = c(1,2,5,2.5,3,7) > m = c(0,0.5,1,1.5) > prior = (rep(1/4,4)) > lilklihood = dn...
As in the title. We know that irreducible Markov chains have a invariant distribution which is reached after enough steps (Reference: Billingsley's Probability and Measure, Theorem 8.6). Question: If two irreducible Markov chains on the same underlying state space have different transition matrices, is it necessary tha...
In this blog post it says "Hinge loss is one such example which makes training with small dataset possible." Why does that hold true? So far, I could not come up with a convincing explanation of why, in the case of a small training data set, choosing hinge loss as a loss function is more suitable than other loss functi...
Let's assume a bivariate population with a correlation $\rho$ and a common $\sigma$ so that $\Sigma = \sigma^2 \begin{pmatrix}1 & \rho \\ \rho & 1\end{pmatrix}$. I would like to know the different ways that could be used to estimate $\sigma^2$ from bivariate samples of size $n$ taken from this population? and what is t...
I came across two different definitions of residual plots: sometimes residuals are on the y axis and the predictor of interest on the x axis, and sometimes residuals on the y axis and the predicted value for the outcome variable on the x axis. Often the plots look similar and they are always interpreted in the same way...
I am working with a dataset of flight records and I model the flight delay. I have variables for the origin and destination airport , but each of them has about 300 categories. I think about grouping the less significant airports. But I am not sure how to do that. Should I: -Group the airport with less number of regist...
The context of this question is about the gradient descent algorithm and the question is, consider the function f : R^2 → R given by f <- function(x) (x[1]-1)ˆ2 + 100*(x[1]ˆ2-x[2])ˆ2 Give a short mathematical proof that f has a unique minimum. I'm unsure what the x[1] and x[2] represent here.
I'm trying to find patterns in a sorted set of spectrograms, each with a rating. The main idea is to train the CNN in such a way that it understands how the pattern "evolves" at each step, taking into account changes in the rating (try to find changes proportional to the rating). I do not fully understand whether such ...
I'm working on a project using elastic nets for predicting a continuous variable using multiple attributes. I'm struggling to understand some of the underlying theory behind what I'm doing. I understand that higher gradients are penalised more than shallower gradients, but why? What if a steep gradient does genuinely f...
Consider the following quantity of interest: $$I[a,b]=\int_{a}^{b}g(\theta)h(\theta), \ldots (1)$$ that is, the expected value of some function $h(\theta)$, of $\theta$ distributed $g(\theta)$. Suppose the probability function $g(\theta)$ is difficult to express. A substitute for analytically calculating equation $(1)$...
I am writing a methodological paper and I have expression like this, which is slightly more complicated bayes rule, because everything is conditioned by c: Is there some established math notation that would say that the whole expression on the right side is conditioned by c? So that I don't have to write it everywhere...
I am trying to learn sample confidence interval for $\mu$ , in this topic , there is a subtopic which is finding the sample size. I know that if $\sigma$ is given (standard deviation of population) , then $$n= \bigg(\frac{z_{\alpha/2}\sigma}{error}\bigg)^2$$ However , we do not always have $\sigma$ , in this case my bo...
Suppose you are testing for differences in two normally distributed variables. In the following situations: -Variables have known but unequal variances -Variables have variances that are unknown but equal Which situation would be generally expected to have more statistical power? I believe tests on distributions with u...
In virtually every time series model out there (e.g. AR(1)), there is always the existence of a white noise term $\varepsilon_{t}$ like $y_{t} = \delta + \phi y_{t-1} + \varepsilon_{t}$. I don't understand why its almost obligatory to stick in a 'white noise' term after every single time series model ever. For instance...
I am training a CNN model from scratch on the Caltech101 dataset. The accuracy of the model is increasing very slowly after the 5th epoch. Shown below is the accuracy and loss curves of the model for 50 epochs. The full training log is found here: https://pastebin.com/P5VJTeK2 This model has attained a 90% accuracy sc...
I have a set of data and see that when I create a factor effects model rather than a dummy coding model, I get different results. In my model, tbStatus and treatment each has two factor levels, with weight gain as a continuous output variable. These are the results for the factor effects model: Model 1: lm(formula = we...
I've read so many previous posts but still feel confused. I've run a logistic regression based on one categorical predictor with two levels. I know with continuous predictors, I can calculate the probability of an event $(Y)$ as $P(Y)=exp(b0+b1x)/1+exp(b0+b1x)$. However, I'm really confused on how to calculate $P(Y)$ f...
In various documentations, I found out two definitions of the multivariate noncentral student $t$ distribution. The most commonly density (PDF) found is (e.g., wikipedia): $$\mathcal{T}(x;\mu, \sigma^2, \Sigma, \nu) = \frac{\Gamma((\nu+P)/2)}{(\pi \nu)^{P/2} \vert \sigma^2 \Sigma \vert^{1/2} \Gamma(\nu/2)} \Bigg(1+\fra...
Is it incorrect to say that $\text{Power} = P(\text{reject} H_0)$? I've seen in my textbook as well as other sources power is always defined as the conditional probability $P(\text{reject } H_0 : H_a \text{ is true})$ But I also see in hypothesis testing you are to regard the probability of the null hypothesis as bei...
I want to train a FinRL model which will trade on an exchange using Ray Tune. I tried two different tune runs: with future data(you can find this code by "#Future data") and without. I expected to see a big difference in rewards betweent these two runs(or at lease some difference), but instead of this I got almost the ...
I have sensor "A" that is outputting a set of data and I also have another sensor that is acting as the reference sensor. The aim is to get Sensor "A" as close as possible to the reference sensors. It will never be 100% Sensor A is slightly off in terms of accuracy and we need to produce a correction factor as a percen...
I'm sorry for this noob question, but I'm following a practical to draw a plot of Boston Housing data set after using Gradient Boosting Machine to train the data, but I don't understand how to interpret the blue line and the red line. > data.frame(Predicted = pred, Observed = data.test.z$medv) %>% + ggplot(aes(x = Ob...
Given a sequence $y = [y_1 \pm \Delta y_1, y_2 \pm \Delta y_2, ..., y_N \pm \Delta y_N]$, how can you compute the maximum of $y$ with its associated uncertainty, and the value of the index $i$ at which the maximum happens and its associated uncertainty? In other words, how can you compute max and argmax values and unce...
I'm having difficulty in understanding the "process" that is going on behind how we are calculating all of our parameter estimates and how the random effects are used in our models. To begin we can express the linear mixed model as: $$y = X\beta + Zb + \epsilon \\b \sim N(0, \psi_\theta),\ \epsilon \sim N(0,\Lambda_\t...
If I define a Markov chain, $$ A\to B\to C \\P(A,B,C)=P(A)P(B|A)P(C|B) $$ Can I derive an expression for $P(C|A)$? I feel like this should be $P(C|B)P(B|A)$, but I am not seeing how to prove it.
Suppose that you have a time dependent data generating process which you are trying to model using either a moving average model or a (linear) regression. I have a couple of questions for these models: Are both of these two approaches appropriate to reflect changes in the data over time? That is, are they appropriate ...
I was wondering if it is good practice to overfit on the training data while tuning a catboost classifier for a binary outcome. Wouldn't it be better to reguralize until validation error equals training error, espescially if the test set has a different distribution of the predictors? In general how should I compare th...
I've been reading Goodfellow et. al.'s paper on GANs and also the conditional GAN one by Mirza et. al. While relatively straight forward, I'm not sure I understand why the prior for the generator is random noise from some distribution (eg. Gaussian). Why can't we create a distribution based on the input space rather th...
I am very confused about whether I need to include the predictor at t when I also include the predictor at t-1 in a linear mixed effects model. For example, consider this simple model: $$DV = \beta_0 + \beta_{1}X_{t-1}$$ Do I need to include the predictor at t as well in this case? $$DV = \beta_0 + \beta_{1}X_{t-1} + \...
I have some intermediate knowledge of Image-Classification using convolutional neural networks. I'm pretty aware to concepts like 'gradient descent, 'derivatives', 'back-propagation & 'weight update process'. I know that filters are randomly initialized and during training they are learned. But I really can't digest th...
Context I am a marketer; and I run marketing campaigns and website design tests a lot. There are many tools - such as online A/B testing calculators - out there to help me test the statistical significance of the differences between two website designs or two marketing campaigns. I want to link that to what I’m learnin...
Can anyone give a brief mathematical derivation on how to calculate principal components in PCA for a given covariance matrix let's say - \begin{pmatrix} 5 & 2\\ 2 & 5 \end{pmatrix} ?
I have 50 data points each with 7 variables. v1 v2 v3 v4 v5 v6 v7 data point 1 data point 2 ... data point 50 These 50 data points are divided into two groups, with label a or b. Each group has 25 data points. I need to compute a final score using the 7 variables for each data point. Since these...
I have a $6$-sided dice and I would like to sample integers uniformly from $0$ to $k$ with $k > 6$. I think that $k$ should be written in its binary representation. Let's say its binary representation has $n$ bits. I should then roll the dice and set rolls $1,2,3$ as corresponding to 0, and rolls $4,5,6$ as correspondi...
In one-way anova, do eta squared and partial eta squared always coincide, both in between- and within-subjects designs, i.e. both in independent and repeated measures designs? I have been discussing about this with professors, who published about statistics and effect sizes. Some of them claim, providing demonstrations...
I want to build a machine learning model where each feature has further multiple attributes. Apologies for the lame example, but this will convey my doubt: Predict the animal on the basis of its fingers(let's say 5 fingers of one paw of that animal). In this case, 5 fingers are the features and each finger has its leng...
Suppose one has a time series of disease counts and populations (at risk, total etc.) or, equivalently, binary events of disease status. Then suppose one wanted to present estimates of incidence or prevalence over the time series. One could calculate separate estimates for each year. I believe this would be the same as...
Suppose I would like to perform an A/B Test, where it only makes sense to implement the "treatment" over the "control" if the "treatment" is atleast 2% better than the "control". Lets suppose that the current "control" conversion rate is 3% and an absolute increase of 2% is required, to attain a conversion rate of 5%. ...
I was told, that the Breslow-Day tests the assumption on homogeneity for the CMH, the same way we check homogeneity of variances in ANOVA (to focus only on the means, not being "confounded" by the different variances). The CMH seems to calculate the common odds ratio adjusted for some categorical strata (it's the weigh...
I have a data like below subj_1 = 10,20,15,30,60,70,90 (in resolution of years - 2011 to 2018) subj_2 = 10,20,30,40 (in resolution of months - Jan 2011 to Apr 2011) subj_3 = 10,15,20,30,45,55,60,70,90,56,79,21,90,80,45,87 (resolution of months - Apr 2014 to July 2015) These time series indicate the profit made by each ...
I have to compute the product of the elements in a vector V. The elements of my vector are in decreasing order and go from very large numbers (eg 5e^5) to very small numbers (e.g 1.8e^-8). I am using MATLAB; if I do prod(V) I get infinity, while if I flip(V) and compute prod(V) I get zero. I imagine the problem is that...
Let $Y$ be a random variable with finite expectation, and $m$ be a median of $Y;$ i.e., $P(Y \le m) \ge 1/2$ and $P(Y \ge m) \ge 1/2.$ Show that, for any real numbers $a$ and $b$ such that $m\le a \le b$ or $m \ge a \ge b,$ $E|Y − a| \le E|Y − b|.$ It is known than the mean absolute deviation is minimum about the media...
() = 5^4; 0 ≤ ≤ 1 A group of 3 friends order small cups of soda, from the soda dispenser. If the 3 small cups are considered a random sample from the dispenser fills, find the probability distribution for the minimum fill and answer, according to the customer satisfaction benchmark. If customer satisfaction is benchma...
I am running a multiple linear regression with interactions between the three independent variables (P, R and L). Y is a continuous variable and P, R and L are discrete variables (in particular they represent 3 different type of payments: P is payment for doing P, with levels (1, 2, 3, 4, 6, 10), R is payment for doing...
I did some analysis that showed that one of my two factors was significant when I modeled it as a dummy coded variable (each of my two predictor variables has just two levels, and so the "on" in comparison to the "off" was shown to be significant). However, when I use a factor effects model, IE something like $\mu_{ij}...
As I understand, O'Brien's Global Statistical Test (GST) (https://pubmed.ncbi.nlm.nih.gov/6534410/) for Multiple Endpoints Analysis is a method for mapping a multivariate problem on a univariate scale. The most common form of GST is the non-parametric form, based on rank sums. Final row of the figure below. (from https...
I have data of sales of a certain product which is sold "Pay as Much as You Want". The daily data is in the form of number of sales per day and the total revenue per day: Day Sales Revenue 1 10 70.5 2 12 82.1 3 8 55.1 4 15 110.7 5 6 54.6 6 9 61.2 . . . . . . I am after building a model of the ...
Suppose to count the drops of rain in a square meter in 15 seconds, producing 16 observations: 40, 20, 24, 15, 23, 12, 39, 26, 29, 33, 16, 36, 17, 32, 40, 15. What is the probability of counting 28 drops in a following measure? By simple computations we can find the mean and sigma of this dataset, namely $\mu = 26.06...
If we have 5 classes and 3 inputs, let's say [C1, C2, C3, C4, C5] and [X1, X2, X3] then, If X1 belongs to the C4 class then the hot encoder for this will be [0, 0, 0, 1, 0]. If X1 belongs to the C2 class then the hot encoder for this will be [0, 1, 0, 0, 0]. How can I mathematically represent it? I've also seen mat...
Suppose I have a set of probability mass functions $S_1,\dots,S_n$ and I find that $S_j$ has the greatest entropy using the traditional formula for entropy using $\sum_{i\in S}-p_i \log_2(p_i)$. In this case we're using a base of 2. Is it guaranteed that if instead I used any other base greater than 1 that I would find...
The question just came to my mind. I notice that generally succesfull models include at least some predictors that somewhat correlate to the target. But is it completelly necessary? Is it possible to succesfully predict the target using many predictors with very low correlation (e.g. corr < 0.1)
I came across this variance reduction technique https://www.exp-platform.com/Documents/2013-02-CUPED-ImprovingSensitivityOfControlledExperiments.pdf the main idea is using correlation with a pretreatment covariate $$ \hat{Y}cv = \bar{Y} - \theta (\bar{X} - E(X)) $$ my confusion is on how to estimate below $$ \theta = \...
I am new to machine learning. I have a problem where I have to predict patients to be/not to be discharged using hospital data and depending on that prediction (i.e. if the patient is successfully discharged), I have to predict the risk of those patients being readmitted. I have created the feature set but the target c...
Let's say we calculate the eigenvector centrality of the same set of nodes in different years (we have a network each year). Note that the eigenvector centrality is normalized in such a way that the norm would be equal to one. Does it make sense to compare the measured values in different years? How can I see the dynam...
I have a four-level ordinal variable as my dependent variable. In the regression table, I have the ordered probit (oprobit) estimates in the first column and the generalized ordered probit (goprobit) estimates in the second, third and fourth columns. I am doing this because the parallel trends assumption does not hold ...
I wasn't really able to find this anywhere in the documentation, or after searching through the model object itself (though it must be there somewhere, of course. The _object attribute of CatBoostRegressor has _get_leaf_weights and _get_leaf_values methods, which return suitably large vectors, but shouldn't there also...
I'm reading a paper by Steve Horvath (2013) for the epigenetic clock he developed. He used an age calibration function before carrying out an elastic net regression analysis. The function F for transforming age is as follows (adult age = 20): F(age)=log(age+1)-log(adult.age+1) if age<= adult.age F(age)=(age-adult.age...
Let $X_{1},\ldots {, X_{n}}$ be iid random variables with $X_{1} ∼ N(µ,\sigma ^{2}).$Let $\bar{X}= \sum_{i=1}^{n} \frac{X_{i}}{n}$, $R=max_{1\le i \le n} \{X_{i}\}$-$min_{1\le i \le n}\{X_{i}\}$.Show that $\bar{X} $and $ R$ are independently distributed. First Method:- I do this problem firstly assuming that $\sigma ^...
I came across the following Bayesian equation in textbook of evolutionary biology: $f(t, r, \theta|X) \propto f(X|t, r, \theta)f(t|\theta)f(r|t,\theta)f(\theta)$ $f(X|t, r, \theta)$ is the likelihood and $f(t|\theta)$ is the prior distribution on times $t$ $f(r|t,\theta)$ is the prior distribution on rates $r$, and $f(...
I have a very basic question. The t-score used in the significance test for the Pearson's correlation is given by: $$ t = r \frac{\sqrt{(n-2)}}{\sqrt{(1-r^2)}}, $$ where $n$ is the sample size and $r$ is the correlation. Does this mean it is impossible to detect a statistically significant zero correlation ($r=0$) as i...
I am assigned to discuss the acceptance-rejection technique in our class. I have trouble understanding the last part of proving its theorem. The theorem goes like this: The acceptance-rejection algorithm generates a random variable X such that $\mathbb P\{X=j\}=p_j$, $j=0,1...$ In addition, the number of iterations of...
Suppose $X, Y, Z$ are random variables. By Tower rule (iterated expectations), $$E(X) = E(E(X|Y))$$ My question is, is $$E(X) = E(E(X|Y, Z))?$$ My attempt (assuming $X, Y, Z$ are discrete r.v.): \begin{align*} E(E(X|Y, Z)) &= \sum_y\sum_zE(X|Y=y,Z=z)P(Y = y,Z=z)\\ &= \sum_y \sum_z \sum_x xP(X=x|Y=y,Z=z)P(Y=y,Z=z)\\ &= ...
I am studying constraint-based causal discovery algorithms like PC. From a paper, I learned that PC algorithm is order dependent. The paper said: "When the PC algorithm is applied to data, it is generally order-dependent, in the sense that its output depends on the order in which the variables are given." However, I do...
Below is the python code for the KS test. import numpy as np from scipy import stats test = np.random.normal(23,10,50) test_std = (test-23)/10 stat1,p1 = stats.kstest(test,'norm') stat2,p2 = stats.kstest(test_std,'norm') print(p1) print(p2) OUTPUT 2.5353101018046572e-70 0.9887775065294439 I took a normal distributio...
Can someone please explain me how the optimization of 6.12 leads to 6.14 and the optimization of 6.13 leads to 6.15?
I am trying to understand the bias-variance tradeoff in practice. I have read several related questions and answers, but still have a few questions: Assume we are estimating a structural equation model (SEM) and we are able to choose between two estimators: one with high bias but low variability, and one with low bias...
I am currently working on machine learning models and in particular on the RandomForest model. For the moment, I managed to get the model on a particular dataset. However, later on, I will have to use several datasets. In order to save time, is it possible to get an equation that will allow me to go directly to this mo...
I am interested to understand in which scenarios person should use sensitivity, specificity, and when should person opt for precision recall. On a high level I understand for a balanced data set we should use precision, recall and if dataset is imbalanced we should use sensitivity and specificity. but I am not sure why...
I am working on a task to predict flight delays. My dataset contains about 6 million records of flights in the US recorded over one year. The dataset contains the following variables: I am informed that the last moment available for prediction is the scheduled time of departure. As you can see, I don't have informatio...
I am running a Wilcoxon-signed rank test, and as suggested by King et al., the best effect size to report for this analysis would be the matched-pairs rank biserial correlation. How is the power (1-B) calculated based on this effect size? The package "pwr" in R allows calculating the power based on linear correlation c...
Suppose that $X_1, X_2, \cdots, X_n$ is a sample drawn from a Gamma distribution with parameter $\alpha$ and $\beta$. Then, the likelihood function can be written as follows: \begin{equation} L(\mathbf{x}|\alpha, \beta) = \frac{\beta^{n\alpha}}{\Gamma^n(\alpha)}\Big(\prod_{i=1}^{n}x_i^{\alpha-1}\Big)\exp\{-\beta \sum_{...
I am considering a linear regression model to predict a target $y\in\mathbb{R}^n$ from a data matrix $X\in\mathbb{R}^{n\times d}$. Let $X_1,\ldots,X_d\in\mathbb{R}^n$ be the columns of $X$. The prediction of $y$ is $\hat{\alpha}1_n+X\hat{\beta}$, where $$\hat{\alpha},\hat{\beta}\in\arg\min_{\alpha\in\mathbb{R}\\\beta\i...
I have a model with several parameters. I apply Bayesian inference with a uniform prior for all of the parameters. After the process is finished, I realize that I need one of those parameters $x$ parametrized as its logarithm: $$y = log(x/a)$$ where $a$ is a constant. As far as I understand, a uniform prior in $x$ is a...