instruction
stringlengths
9
38.7k
my friend and I had an interesting disagreement about a statistical scenario, and we were wondering if we could get your perspective on it. There’s a large population of numbers, let’s say 1000. We don’t know any of the numbers at the beginning, but we are given them one at a time at random. We don’t know anything abou...
I am doing behavioural research on dragonfly larvae and I am trying to answer the question "Is there a behavioural difference between males and females and between species? + Do the difference between males and females change according to the species?" The behavioural data I have is the total distance moved by each ind...
I have behaviour data to analyse: the time budgets of cows (three columns of 3 different behaviours per hour). Values range from 0 to 60 minutes each hour (e.g. 30 min active, 10 min lying and 20 standing). The behaviours each hour always add to 60, and time goes from 0 to 23. For variables I also have day and cows (wh...
While the proper way of constructing the sampling distribution would be to repeatedly sample from population with unknown parameters, I'm not convinced it is the case in practice. Surveys performed in real life is always one-off questionaires that collect a bunch of samples, e.g. one sample of sized n. If they are to c...
I have a longitudinal dataset with 22,000 patients, where patient entry dates are different. Regarding time related data, all I have are birth and measurement dates for each patient. For example, while a patient is measured in "2016-04-27" "2016-05-23" "2016-06-27" "2016-07-20" "2016-07-21" "2016-07-22" "2016-07-23" "2...
I'm looking for something that I think is called "[somebody]'s transform", but I can't remember its name. The idea is that if I have a measure on $[0,1]$ representing the bias of an unknown coin, then I can get the probability of observing $n$ heads and $m$ tails by integrating the measure against a beta distribution. ...
I have conducted a variance partitioning in R with the vegan package to test how weather variables partition in the variance of the green-up day. library(readr) library(vegan) data = read_csv('C:/path/data.csv) out = varpart(data$greenup, ~ data$CAPE, ~ data$Temp, ~ data$precip, ~ data$WS) out Partition table: ...
I want to meassure satisfaction per customers. I have to factors that define satisfaction: Amount of Incidents Sentiment-score per Incident Sentiment-score is calculated with natural language processing sentiment analysis and is in the range of -1 (negative sentiment) and +1 (positiv sentiment) Amount of Incidents is...
I'm trying to predict weight based of age and height for people under 30 and people 30+ I have the original data set mydata I have then created two subsets mydatalessthan30 and mydata30plus Then I have A = lm(mydatalessthan30$weight ~ mydatalessthan30$age + mydatalessthan30$height) B = lm(mydata30plus$weight ~ mydata30...
Suppose $y_1,\dots,y_n$ are i.i.d. and have the $N(\mu, \sigma^2)$ distribution. I'm interested in finding an unbiased estimator for $$ \rho := \frac{\mu^2}{\mu^2 + \sigma^2/n}. $$ A naive approach Consider the ratio between the unbiased estimators for $\mu^2$ and $\mu^2 + \sigma^2/n$. Denoting $\hat \sigma^2=\frac{1...
I have a discrete probability distribution: [0.05, 0.05, 0.05, 0.25, 0.6] which represents the probability of a character(given by the index in the vector) to appear. How can I define a measure between 0 and 1 that shows that most of the probability is concentrated on the last two characters?
I have a question. I have a logistic regression model with two variables a & b. In the analysis of deviance table (type = 2) seems that variable b is more significant than a. But when I plot the logistic curve it seems that a has the plot: and b: How is that possible? I feel I missing something.
The problem is about doing a regression on the impacts of money supply growth and output (GDP) growth on inflation rate growth: $$ \mathrm{inflation} = \beta_1 + \beta_2\mathrm{money} + \beta_3\mathrm{output} + u $$ The variable output is known to be endogenous. The variable money is exogenous. There are four instrumen...
I have the following Weibull distribution: $f(x;\lambda,\beta) = (\lambda\beta)x^{(\beta-1)}e^{(-\lambda x^b)} $ where $\lambda$ is scale parameter and $\beta$ is shape parameter. I have an alternative parameterization for Weibull in r link: $f(x;a,b) = \frac{a}{b} (\frac{x}{b})^{(a-1)} e^{(- (x/b)^a)} $ where $a$ is s...
In the following model, I have a linear model with a categorical by continuous interaction: library(ggplot2) library(lsmeans) myModel = lm(Petal.Length ~ Petal.Width*Species, data = iris) ggplot(data=iris, aes(x = Petal.Width, y = Petal.Length, color = Species)) + geom_jitter(alpha = 0.5) + geom_smooth(method = "...
I am confused by a simple fact but I can't solve my head around it! It's known that: $P(y,\theta) = P(y|\theta)*P(\theta)$ and $P(y,\theta) = P(\theta|y)*P(y)$ Giving us: $P(\theta|y)*P(y) = P(y|\theta)*P(\theta)$ (both valid probability density functions) But in bayesian inference literature we learn that $P(y|\theta)...
I need to take independent draws from Normal Inverse Wishart distributions with different parameters. In practise I want to draw: $x_i|\Sigma_i \sim \mathcal{N}(\mu_i, \Sigma_i \otimes \Psi_i )$ $\Sigma_i \sim IW(S_i, v)$, for $i = 1 , \ldots, T$ where $\Sigma_i$ is $N \times N$ and $x_i$ is $k \times 1$. The parameter...
I have read that batch gradient descent forces this summation at every step of the update, which makes it time consuming. But if we have the following hypothesis function: $$h(x^i) = w_0 + w_1x^i$$ Then the update rules become: $$w_1 = w_1 - \alpha/N\sum_{i=1}^n (y^i - w_0 - w_1x^i)x^i$$ $$w_0 = w_0 - \alpha/N\sum_{i=1...
I have 6 binary response variables, and I wish to explore what variables can predict these binary outcomes. glm(cbind(Y1,Y2)~X1+X2, data = dt) doesn't do the work. It gives me an error: eval(family$initialize) : y values must be 0 <= y <= 1, although all variables have been coded into 1 & 0. Also, both glm(Y1~X1+X2, da...
I am reading Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) section 6.3 Recursive Partitioning with Binary Outcome. It presents specification of the data structure for fitting tree-based models. Survival times $T$ are encoded as $(y_{i,1},\dots,y_{i,t_i-1},y_{i,t_i})=(\underbrace{0,\dots,0,1}_{t_i})$ if $...
I am now working on a problem To prove the convexity of a zero-one loss multiple with a convex function, and it looks like this: $$L(s) = s^2 \times \boldsymbol 1(s\leq 0);$$ when proving this convexity, is it ok to assume this $\boldsymbol 1(s\leq 0)$ a constant? if it is not ok to treat 1(s<=0) as constant, how would...
This is a followup analysis on this post, inspired by the comments from @EdM. I fitted a marginal rates model (Lin, Wei, Yang, & Ying, 2002) on recurrent event data but don't know how to include and then intepret the nonlinear effects of time-varying covariates. Here is a reproducible example: library(survival) library...
I am reading Tutz & Schmid "Modeling Discrete Time-to-Event Data" (2016) section 3.4 Estimation [of basic regression models]. It presents specification of the data structure for expressing survival models as models with binary dependent variable. That makes them amenable to the widely available fitting routines for suc...
According to http://r-statistics.co/Beta-Regression-With-R.html, the topline remark is: Beta regression is used when you want to model Y that are probabilities themselves Grammar aside, one may assume that using the default specification, the beta-regression will provide log-odds ratios for response. But why should t...
Consider Gaussian white noise $\varepsilon_t$ with variance $\sigma^2$. Is the following stochastic process $$X_t = \varepsilon_t - t\varepsilon_{t-1}, \hspace{1cm} t \in \mathbb{Z},$$ a Gaussian process? I can show that this process is not stationary (don't know if it helps anything). As $\varepsilon_t$ is Gaussian I...
I'm confused about how to manually calculate SSE using R output. I'm thinking about using residual standard error and maybe the relationship between SSE, SSR and SSTO, but not sure what's next. My R output is attached below:
Let $X_1, X_2$ be independent (not necessarily identically distributed) random variables. Assume we have estimates for the means $m_1, m_2$ and confidence internals $\left[a_1, b_1\right],\left[a_2, b_2\right]$ i.e. $\mathbb{E}\left[X_1\right]=m_1, \mathbb{E}\left[X_2\right]=m_2, \mathbb{P}\left(X_1 \in\left[a_1, b_1\r...
Will be grateful for insights into the issue below! I have two explanatory GAMs below (in this example implemented with mgcv), where the effects of x1 and x2 are of interest. x1 is air temperature, x2 is the humidex (a composite of air temperature and humidity), time represents the number of the day in a 14-year time s...
Right now I am looking into analyzing the factors of crime in an economics paper. I currently have a multiple OLS regression set up that is pretty standard: Y = B0 + B1(Variable) + B2(Variable) + B3(Variable) + ... + u (error term) Here is a small sample of my dataset: However, this model seems very weak in terms of p...
Disclaimer: This is a long explanation but I feel like it was needed to give a thorough description of my problem. Let me know if this question is in the wrong place. I am relatively new to Bayesian modeling and I am trying to wrap my head around a particular regression approach using count data. I understand how to mo...
Given a binary confusion matrix with true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN), what are the formulas for sensitivity, specificity, and recall? I'm coming across many conflicting answers online. For instance, wikipedia says: But in a textbook — "Data Science for Business:...
What is the mathematical definition of the independence sign $\perp$? Example of IV exclusion as (conditional) independence. \begin{align} (Y_1,Y_0)\perp Z\mid X \end{align}
Let $X \sim N(\mu, \Sigma)$ and let $\hat\Sigma$ be the sample covariance matrix calculated from an iid sample $X_1, \dots, X_N$. Also, let $\phi_i$ and $\phi_j$ be the orthonormal eigenvectors of $\Sigma$ associated with eigenvalues $\lambda_i$ and $\lambda_j$ respectively, where $i \neq j$. A Quadratic Discriminant F...
What is the difference between "repeated cross-section" and "pooled cross-section"? Pooled cross-section is defined e.g. here as "randomly sampled cross sections of individuals at different points in time. Example: Current population survey (CPS) in 1978 and 1988". Repeated cross-section is defined e.g. here as "one ty...
I have the following information for the ages of individuals: Sample size = 5. Data: $$ x_i = (10, 12, 15, 16, 14) $$ The population mean previously accurately estimated is 12. Prior information shows the standard deviation is 4 and the range is from 2 to 5. I also have the following information: Gamma prior: $$ Gamma...
Suppose I observe high school graduates applying to a certain college. I want to model the probability to get admitted on the basis of individual characteristics (cognitive ability, test score, GPA, exchange experiences, interviewer's scores, etc.) with a logistic or a probit regression. Suppose I observe 10 years of a...
Are there any known ways of getting an unbiased estimate of the condition number of the true covariance matrix being estimated, or at least correct within a small number of orders of magnitude? For concreteness, you can consider the 2-norm condition number; but the one-norm (or equivalently infinity norm for a symmetri...
I'm studying Reinforcement Learning and I just read about first-visit and every-visit Monte Carlo, however I don't get why we are not considering last-visit MC as a possible simulation. My "last visit" comes from the fact that if we have a sequence of states $S_0, ..., S_T$ and we see the state $s$ the last time at tim...
I would like to run a ordinal regression. My dependent variable is a scale from 0 to 6 but the number of observation in each category are not even (my sample size is very small - 70) and in some categories there are only few observations. Should I create less category such as low, medium, high? In that case, how do I s...
Definitions: MLE = Maximum likelihood estimation. MAP = Maximum Apriori Estimation. If we were to use a simple example and say "Use MLE to find the number of free throws made out of 10", we would pick 5 as the most probable number of free throws made out of 10. With the previous example, lets say we received new info...
I'm working with the "iris" dataset in R (version 4.0.3), and I'm trying to find the best model for predicting Sepal.Length. Over the course of my analysis, I've come across two models that I can't compare using anova(): colnames(iris) <- c("sl", "sw", "pl", "pw", "species") model1 <- lm(sl ~ pl + sw + species + pl:s...
Problem statement: Understand what factors impact the different operational times in a supply chain warehouse operation. I have observational data (past 1 year) which contains number of orders, packages, products, time taken to push out a product out of warehouse etc. I want to create a model to understand which factor...
Can't seem to find a good explanation online of concrete examples of where you would use one over the other? I also read somewhere that L1 is supposedly slower than L2, but not sure how that is since L2 involves squaring and L1 is just taking the absolute value.
I'm reading the textbook "Introduction to Econometrics" by Stock and Watson. Chapter 11 discusses regression with a binary response and it teaches the logit/probit models mostly. These seem to make sense when the plots show an S shaped relationship between X and Y, but what if I'm working with a dataset where the model...
Predicted Probability of GAMM I've probably beaten this topic to death here, but I continue to have issues with model fitting. Thanks to the excellent advice here, I was able to at least square away what was programmed correctly. However I have run into two new problems. First, fitting a gamm4 object is extremely time-...
In my dataset I have a biomarker that according to the literature may or may not be related to the patient's gender and it is defenitely related to the patient's age. This marker defines the stage of disease. I wanted to reproduce a barplot for the 5 stages of the disease accordingly to age and gender. I thought of a d...
Let's say to estimate the mean age of teenagers in a certain country using sampling, I take 10 000 samples of 100 people in that country. Would it be correct to say that the samples are the individuals, the variable measured (on the individuals) is the mean age of the 100 people in a sample? The population therefore wo...
Suppose I have $k$ different unknown probability distributions (e.g. $A$, $B$, ...) and I have data that provide examples of draws from pairs of distributions (e.g. $a_1$ and $c_1$, then $b_2$ and $d_2$, ...) where the subscript is the index of the sampled pair. However, for each pair drawn, the actual value from each...
I have longitudinal data of body weights of over 100K participants. Time points of weight measurements between participants are not the same. What I want to know is the average time difference between 1st and 2nd measurement as well as 2nd and 3rd measurement etc. Another one is how many people or % of people who have ...
Can someone explain the intuition behind how the likelihood function for a specific value of $\theta$ is different if $f_\theta$ is a pmf vs a pdf? I thought that it was simply the probability that a certain outcome is observed, which is basically the pmf/pdf.
I have a dataset with time-to-event data (so this is a continuous outcome). The data, however, is such that I do know that when the event did not occur - then it did not happen. What could be an appropriate model approach for this scenario? I was thinking about a hurdle model, but are there other approaches? Thanks!
The goal is to find a term to describe a distribution that fits with the other "lofty"-sounding words like: Skewness: mode!=mean / symmetry Kurtosis: How "fat" the tail is ???: how much spread is contained within one standard deviation I guess it's just variance but if "variance" is the most "lofty" sounding word I w...
Imagine we are running a physiotherapy clinic, working 5 days a week. The overall number of treatments given in a day is $k$, and the daily treatments are randomly drawn among the registered patients. Every week, a new batch of patients is registered to the clinic. Each patient needs to get their series of 10 treatment...
Suppose I have a sequence of observations $\mathbf{o} = (o_1, ..., o_T)$ and a corresponding sequence of states natomiast $\mathbf{q} = (q_1, ..., q_T)$, where $q_i \in \{1,2,...,N\}$ Let $\mathcal{L}(A, B, \pi)$ be likelihood function of HMM $\lambda = (A, B, \pi)$ \begin{align} \mathcal{L}(A, B, \pi) = p(q_1)\pro...
I have a data set with a continuous response variable and two categorical covariates. Let's imagine that I worked at an e-commerce company and was trying to regress the revenue we get from each user as a function of customer type ('A', 'B', 'C'), whether they were exposed to a specific treatment ('Exposed', 'Control'),...
I'm working with OpenCV which has some tracking algorithms (BOOSTING, MIL, KCF, MEDIANFLOW, TLD, ...). I've read many papers where they use the Bhattacharya Coefficient to measure the efficiency of each tracker. I know the formula is: But I don't know how/where to start to calculate it. I know that an OpenCV tracker w...
Bonferroni simultaneous confidence intervals are built for finite parameters, while Scheffe simultaneous confidence intervals are built for infinite parameters. Intuitively, Scheffe will produce wider intervals than Bonferroni because Scheffe needs to 'include' more parameters. Are there any specific discussion of the ...
The central cross-moments of a random vector $[X_1, X_2,\dots, X_n]$ is $$ \mu_X(n_1,n_2,\dots,n_n) =E[(X_1-E[X_1])^{n_1}(X_2-E[X_2])^{n_2}\dots(X_n-E[X_n])^{n_n}]$$ I wish to know if $\mu_X(1,1,\dots,1)$ is zero if the $X_i$ are independent of each other. And, if possible, a proof or reference. The fact that this is t...
I am stuck with this machine learning problem. For input, we have a word in which some letters are missing, e.g., word = 'in---m-nt'. Then we can make up to 6 guesses. guess1 = 'e', then word = 'in--ement' guess2 = 'a', then word = 'in--ement' guess3 = 'x', then word = 'in--ement' guess4 = 'c', then word = 'inc-ement' ...
I've been reading the paper Gaussian Processes with Monotonicity Information, but I am confused about what Monotonicity Information to be included? As the paper states, the authors model the joint GP which includes the observations and the derivative of the operating points. But they does not specifically point out wha...
I have a dataset of customer transactions containing revenue, customer id, region, product category, product id, support team, date of trqnsaction etc. I intend to use buy till you die models for predicting customer churn, customer lifetime value and future number of transactions. These models use probability distribut...
[1]. Prior ⇒ Data ⇒ Posterior [Prior] ⇒ More Data ⇒ Posterior [2]. Prior ⇒ All Data ⇒ Posterior What is the difference of waiting for the full data set compared to updating the prior as new data becomes available? Do we get the same posterior distribution?
I'm wondering which methods are commonly used to estimate hyperparameters for priors in Bayesian statistics, and how they work? The setting I'm working with is Bayesian linear regression, so I'm mostly interested in shrinkage priors which have a small number of hyperparameters to tune. So far I've come across full Baye...
I will refer to R and SAS examples, but this is a general statistical question. I don't fully understand two things. Let's assume I want to fit a model for observations repeated over time and compare if the means differ between men and women. In SAS you can use the PROC MIXED procedure for it in 2 ways: using a mixed ...
I've been studying some difference equations in my free time, and now I'm seeing them everywhere, especially in time-series models. Here are some models that seem to be difference equations to me. I'm wondering whether they actually are difference equations and whether it makes sense to think of them as difference equa...
I am reading Single World Intervention Graphs (SWIGs): A Unification of the Counterfactual and Graphical Approaches to Causality, and they describe both Finest Fully Randomized Causally Interpretable Structure Tree Graph (FFRCISTG) and Non-Parametric Structural Equation Models with Independent Errors (NPSEM-IE), but fe...
Sorry for perhaps a little confusing title. I am lost with a relatively simple question. I measured each participant's heart rate in different parts of the experiment as well as asked each participant at the same parts of the experiment how stressed they are (likert from 0-10). Now what I would like to know is that do ...
I have not been able to find an answer to this question. I have multiple continuous variables and I am trying to run a multiple linear regression. As part of that, I am checking the assumption of homogenity of variance using a Fligner-Killeen test in R. The issue is that I keep getting a p-value of NA. Here is my code:...
Is there a way to perform a post-hoc pairwise comparison following anova.cca, for categorical independent variables with >2 levels, in the same sense as TukeyHSD following aov? For example, please consider the following result (modified from vegan documentation): library(vegan) data(dune) data(dune.env) fit = cca(dune ...
If I make a model that predicts probabilities (e.g., logistic regression or a neural network), I would like it to have the property that, when it predicts a probability of $p$, the event happens about $100p\%$ of the time. That is, I would like calibrated probabilities. If I do my work in Frank Harrell’s rms R package,...
This paper says that the notion of a batch problematic for RNNs (page 9) (which is why you can't apply batch normalization for RNNs?). Why is it hard to talk about batches for RNNs? Eg. the Pytorch API even has a parameter to control the batch size, so batches "clearly" make sense for RNNs (and, therefore, batch normal...
I have a logistic regression model A. I want to build a new model, B, that is based on model A, but with one or more new features. This features are of a diffrent kind and needs to be trained on a dataset with another time horizon, monthly instead of annual. In order to do this, is it posible to use the probabilities t...
My understanding is that self-supervised learning approaches approximately work like the following (I have Wav2Vec 2 in my mind here, used in speech recognition, but NLP transformer models are similar): You are training an "context representation" or "embedding" function $f_\theta$ minimizing (some loss involving) a c...
I'm studying causal inference and I'm struggling to understand how to properly classify an estimator as nonparametric. My colleague argued that the Synthetic Control Method is an example of a nonparametric estimator. His point is that the inference in SCM is based on permutations and a rank. I argued that the SCM can b...
I have a random variable that is exponentially distributed with some $\lambda$. I'm sampling observations from this variable, but I'm limited to observing only those that are less than some maximum value $m$ ($m$ is a known value). In many cases, the event is not observed during the interval $[0,m]$, meaning either it ...
I'll illustrate my question with an example. Suppose I have 25 observations for 3 binary variables. The observations belong to 3 pre-labelled cohorts 1, 2, and 3. Let's say: n1 <- 10 n2 <- 8 n3 <- 7 are the n's for each cohort. Each cohort has a set of parameters determining the probability of each variable being 1 o...
I am currently taking a regression course and ended up with someting that I cannot figure out to solve. So if anyone who can help me further I would appreachiate that. Suppose we have $y_i=\beta_0+\beta_1x_i+\varepsilon_i, \;\;\; i=1,...,n$ where we have $\varepsilon\sim N(0,\sigma^2_\varepsilon)$. Suppose further tha...
I have the following model. The outcome, prop_correct, is a proportion of words correctly identified by participants in 5-word sentences (0 - 1) which is logit-transformed. Fixed effects include speaker group (disordered vs. non-disordered), Condition 1 (levels = on, off), and Condition 2 (levels = A, B, C; contrasts: ...
Let be $(X_n)_{n \in\mathbb{N}}$ a sequence of random variables and $Z$ another random variable such that, when $n$ goes to infinity: $X_n$ converges to $Z$ in distribution : $X_n \overset{\mathcal{D}}{\to} Z$, The (Pearson's) correlation of $X_n$ and $Z$ converges to 1 (assuming these correlations are all well define...
Say we have data on the total number of units assigned to the control group (1200) and their outcome (20%). We are dealing with one-sided non-compliance, and have data on number of never-takers in the treatment group (500), the outcome of never-takers (25%), and the number of compliers in the treatment group (1500) and...
Suppose that I have data $\left\{ (x_i, y_i, z_i ) : i=1, 2, \dots, N\right\} $. I have fitted two linear models: $$ \left[\begin{matrix} z_1\\ z_2\\ \vdots\\ z_N \end{matrix}\right]=\left[\begin{matrix} 1&x_1\\ 1&x_2\\ \vdots&\vdots\\ 1&x_N \end{matrix}\right]\left[\begin{matrix} a_1\\ b_1 \end{matrix}\right] $$ and $...
I'm working on a software codebase transfer between Python (scipy) and Matlab, and am wondering if anyone has any insight as to why I'd be getting different p-values when calculating the p-value for Kendall's Tau on the same arbitrary 100 element random vectors. I assume there's something different about the normality...
Imagine I have a model that predicts a person’s height from a photo (just an example). Each individual has their ground-truth height (H), and the model outputs a predicted height (h). The model error is then error = h - H, and can be either positive or negative. One possible measure of model performance would be the st...
Given observations $\textbf{x}_1,\dots,\textbf{x}_n$ with labels $y_1,\dots, y_n$, the SVM optimization problem is \begin{align} \min_{\textbf{w},b,\xi} \ \ & \frac{1}{2}||\textbf{w}||^2 + C\textbf{1}^{\top}\xi \\ \text{s.t.}\ \ \ & \textbf{Y}(\textbf{X}\textbf{w} + b\textbf{1}) \geq \textbf{1} - \xi \\ &\xi \geq 0 \e...
The data set is 32% of n:2000 CI: 95 I did $x=\pm 1.96\sqrt{\frac{0.32*0.68}{2000}}$ and $CI=0.32\pm 1.96 * \frac{0.466}{\sqrt{2000}}$ to find the confidence interval My numbers came out pm 0.34, 0.29
Consider model A, a deployed model that produces a probabilty of if an event occur or not for a population. This I want to improve by building another model, model B, on top of model A. Model B should return adjusted probabilities for the same event. The data for model B is monthly. For model A it’s annual. The feature...
I'm reading a book and it talks about (standard) cubic splines, defined as: $$ E(y) = S(x) = \sum_{j=0}^3 \beta_{0j}x^j + \sum_{i=1}^h \sum_{j=0}^3 \beta_{ij} (x-t_i)_{+}^j $$ It then mentions that the $X'X$ matrix can become ill-condition and to overcome this a cubic B-spline can be fitted as defined by $$ B_i(x) = \s...
When you have a t-statistic and a standard error, how can you find a p-value? Specifically, I am given this question a t-statistic of 1.363, and a standard error of 0.733. And the following table: The answer is a pvalue of 0.173. How do I find the pvalue?
Let $[x_1, x_2, x_3]$ are three independent points in Cartesian space which are Gaussian distributed with a non-zero mean and identity covariance. I need to calculate the following expectations, \begin{align} \mathrm{E}\left[ \frac{x_i}{\sqrt{x_1^2 + x_2^2 + x_3^2}}\right],\quad \mathrm{E}\left[ \frac{x_i^2}{\sqrt{x_1^...
I am new to Machine Learning. I am trying to predict water levels and was given two data sets. 1 file is a Training data set with my water levels and factors that cause it, the other file is Testing data with only the factors and not including the actual water levels. I am thinking of using the method of Decisions tree...
I have a set of datasets that have undergone 6 different pre-processing approaches prior to undergoing dimensionality reduction with two different algorithms, after which I score them for structure preservation - so a 40 samples(the datasets) x 6 variables(the different pre-processing approaches) matrix for each of the...
I am reading Cattaneo, Feng & Titiunik (2021)'s JASA paper, "Prediction Intervals for Synthetic Control Methods" (here ungated) and have encountered a development of SC that I don't understand much. Instead of building the SC using an outcome variable and a set of covariates, they generalise to multiple (primary + seco...
I want to know about covariance and correlation coefficient. What is their relationship in terms of equation? What are their similarities and differences?
Suppose we have a model $y=X\beta+\varepsilon$, where $y$ is an $n\times 1$ vector, $X$ is an $n\times k$ matrix of parameters of full rank $k$, $\beta$ is a $k\times 1$ vector and $\varepsilon$ is an $n\times 1$ vector such that $\mathop{\mathbb{E}}(\varepsilon)=\vec{0}$ and $\mathop{\mathbb{Var}}(\varepsilon)=\sigma^...
Below is an example from a set of slides: Suppose the distribution(X, Y) was entailed by the SEM: $$X \leftarrow N_X $$ $$Y \leftarrow 6X + N_Y$$ where $N_X, N_Y \sim Normal(0,1)$ and DAG $X \rightarrow Y$. According to the slides, the conditional distribution $X|Y=3$ is $Normal(\frac{18}{37},\frac{1}{37})$. I am havin...
I'm a little confused about how to specify a regression model in Bayesian terms. I understand that for the simple case of plain linear regression, the response variable is normally distributed about the mean, which varies linearly, like so: $$ Y \sim N(\beta X, \sigma) $$ where $\beta$ and $\sigma$ are drawn from prior...
I am doing a ab test. I want to test if a treatment is statistically better than a control. I want to split 30 subjects randomly and evenly into two groups. My way is first generate random number for these 30 subjects, and then sort them in an ascending order. Finally, assign first 15 subjects into A group, and the res...
How can be the p-values be computed in quantile regression? I can see pre-existing packages in R(quantreg) and Python(statsmodel) arriving at the p-values in Quantile Regression. Kindly provide reference or steps of the computation.
Suppose I am calculating the average rating for several products that were rated by different people. For example, assuming that if I choose 5 random people and calculate average ratings 100 times then the variance of each average is of course higher than if I chose 10 random people. I would like to figure out how many...
I fitted a mixed effects meta-regression model with one dummy-coded predictor (USA vs. Europe). The output tells me that the predictor is significant. I then wanted to get the average estimated effect size (and CI) for the US and for Europe. I used the predict() function. However when I look at the confidence intervals...