instruction
stringlengths
9
38.7k
Let's say that we know the outcome of a vote for choosing A or B and this is based on some demographic factors. We estimate $ln\frac{P}{1-P}=\beta_0+\beta_1Dem_1+\beta_2Dem_2+\beta_3Dem_3$, where $P$ the probability of choosing A and $Dem_i$ demographic factors, e.g. people that completed secondary education. We suspe...
How can I compute the means and covariance of a truncated bivariate normal distribution? I am particularly worried about the case when the truncation occurs very far from the mean. Is there a robust numerical evaluation procedure? By truncated bivariate normal distribution, I mean a density of the form: $$f(\vec{x}) \p...
I'm building a regression model to predict airline prices using python. I have three inputs mean , median and no of days from departure, and dataset greater than 100000 data points crawled at daily intervals. I used the log of the input variables and divided the dataset into 80:20 for training and and testing purposes...
I have coefficient sizes that vary over w wide range, in a model with 5 predictors apart from the intercept - from -0.000355 to 1.797131, and the intercept itself is fitted with an estimate of 2.638328. All variables are significant at a p-value level of 5%. We are not standardizing the coefficients, since we want the...
In ranking, a commonly used method to evaluate the performance of a ranking algorithm is calculating ranking metrics such as MAP, NDCG. In use cases where there is no ground truth signal, some proxy signals as used for relevance. For example, in a recommendation system, we can use user's interactions (clicks, purchases...
I'm using lrtest to compare two models in Stata. When I get a p-value is 0.7673 that is greater than 0.05, does it mean model3 is better than the other model1? I wanted to learn how to interpret which model is better? Results:
I am wondering if anyone has any references or material that relates to a survey or summary of current topics of research either in machine learning or at the intersection of machine learning and causal inference.
I'm looking at a table of logistic regression results. Specifically, the table shows "Logistic regression model of hypertension status in relation to lead biomarkers in the normative aging study, Stratified by calcium intake". The outcome variable is the presence of hypertension (1-yes, 0-no). The covariates are: age>...
Let's say $x \in \mathbb{R}$ is normally distributed so that $x \sim \mathcal{N}(\mu,\sigma^2)=p(x)$. I want to simplify the following integral, which includes arbitrary, but fixed integration limits $a\in \mathbb{R}$ and $b\in \mathbb{R}$. $I := \int_{a}^{b} x^2 p(x)dx$. In the case of $a=-\infty, b=\infty$ the integr...
Let's say I observe a variable $F_{obs}$ and I have a model to predict this variable through the function $F_{pred} = f(x_1,x_2,x_3,x_4)$. I want to find the possible range of each predictor covariate $x_i$, so that the combination of all $x_i$'s yields values of $F_{pred}$ that are close to $F_{obs}$. I assume a unifo...
According to scikit-learn, by using a probabilistic model : $p(y|X,\omega,\alpha) = \mathcal{N}(y|X\omega,\alpha)$ with $\omega$ given by a spherical Gaussian: $p(\omega|\lambda) = \mathcal{N}(\omega|0,\lambda^{-1}\mathbf{I_p})$ it is now a Bayesian model of ridge regression. So can i say that the estimation of this mo...
Good day. I recognize that this could be more appropriate for SO; however, I am including my statistical rationale on why I am choosing this method. So, if there are any recommendations on a different approach, I would gladly hear them! Thank you in advance for your time in helping me with this. I’ve been scouring t...
I often find myself with questions that vary along this theme, but the internet is so full of simpler cases that I can never find what I'm looking for. So this question is two-fold: a) what's the answer? and b) what books should I have read / terms should I have googled to have answered this myself? So: I have measurem...
From what I understand, MLE for a model helps us find out what parameters in the model will suit the data most. Thus, in linear regression, we try to find $L(\theta)$ as $\prod_{i=1}^{m}p(y|x;\theta)$ i.e., we try to find what $\theta$ will suit the data points most and we already have $x$ given to us. This is similar ...
I'm reading Blei et al. (2017) "Variational Inference: A Review for Statisticians" to understand Variational Inference (VI). I follow the paper's notations: $\mathbf{x}_{1:n}$ (observations), $\mathbf{z}_{1:m}$ (latent variables), and $q(\mathbf{z})$ (a variational factors) $$ q(\mathbf{z}) = \prod_{j=1}^{m} q_j(z_j).$...
Given a set of observations denoted by $x_1,...,x_n$, how to show that the mean $\bar{x}$ and the median $\tilde{x}$ are the same if the distribution is symmetrical? My book says so, but I'm having trouble seeing that from the definitions of $\bar{x}$ and $\tilde{x}$. The book doesn't provide a definition for a symmetr...
What is the absolute minimum number of data points needed to estimate random intercepts and random slopes for a continuous covariate? IIUC, in the 'categorical case' one needs at least two data points per subject to estimate random intercepts and at least two observations for each combination of subject and treatment ...
Consider a good old regression problem with $p$ predictors and sample size $n$. The usual wisdom is that OLS estimator will overfit and will generally be outperformed by the ridge regression estimator: $$\hat\beta = (X^\top X + \lambda I)^{-1}X^\top y.$$ It is standard to use cross-validation to find an optimal regular...
The process is defined similarly to the Bernoulli process composed of $n$ Bernoulli trials. The difference is that the trials are dependent, that is: $$ P(X_i = 1 | X_1, ..., X_{i-1}) = \frac{m -\sum_{j = 1}^{i - 1} X_j}{m} p , $$ where m is a natural number.
I am trying to build a multiple regression model, and many of my variables looks like this (histogram for time spent in the system). The reason I had such data is because zero is actually represents another business case: customer created the account but never used it. How should I user this types of the variables in ...
I'm currently working on a dataset of +400 samples, with 2 quantitative variables (salinity and depth) and 2 qualitative ones (sequencing method performed and nature of the sample, sediment or water) My objective is to understand which variable(s) influence my phylum abundance. I decided to use CCA and it works well,...
Why is the expected variance of y bar expressed using the equation? $Var(\bar Y)=1/n * \theta$ I would expect the following expression. $Var(\bar Y)=1/n^2 * \theta$ For poisson for example
I've been just told that using Dropout For LSTMs is not considered the right thing these days. Is it true? If yes, what is recommended for overfitting prevention with LSTMs? Thanks!
While reading through the differences between Generative vs Discriminative; Bayesian vs. Frequentist, I was able to classify the probabilistic models into a table. On further searching on Google, I was able to find a similar table being proposed: https://lingpipe-blog.com/2013/04/12/generative-vs-discriminative-bayesia...
One of the things that make them super-slow in training, is that they often use two nested loops to iterate on data through all time steps for every single iteration, calculating loss and cost at the end, and then back-propagate that error to get the gradients to update all weight matrices. I mean, We can't get rid of ...
In The Idiot Brain: A Neuroscientist Explains What Your Head is Really Up To, Dean Burnett wrote The correlation between height and intelligence is usually cited as being about $0.2$, meaning height and intelligence seem to be associated in only $1$ in $5$ people. To me, this sound wrong: I understand the correlat...
I have two series, X & Y. X & Y are co-integrated, which implies that: Z = a1*X + a2*Y is I(0). I put Y as function of X: Y = alpha + beta*X + epsilon So the combination: Y - beta*X is always stationary?
I have four observational experiments (data sets) that I wish to combine and summarize in a single path analysis model. Each experiment is 3-dimensional but the observables and therefore dimensions/variables are different in each data set. One variable X.1 is common to all datasets. All other variables are present i...
I have performed curvilinear regression analyses on my data and the curvilinear fit is better than the linear (as determined by the F-stat of anova). I am now searching for a way to measure the reliability of my findings. The sample size is not large enough to do cross-validation (n=60). I was thinking of bootstrapping...
I am analyzing the data of a personality survey to see whether the order in which a text was presented to participants has an effect on their scores. For that, I am performing a one-way independent measure ANOVA with three groups (text presented 1st, 2nd or 3rd), on each of the five personality trait scores I compute f...
in machine learning, using One-Hot encoded data like words for RNNs (especially when we have a large dictionary like 10M or larger?) causes the dot product with the weight matrix slow. THE QUESTION IS: Is this true? and if yes, Is one-hot encoding still used even though? and, Does word embedding algorithms use one-hot ...
I am implementing the PLS-DA method presented here on a data set and I am trying to understand the procedure; and whether there is anything conceptually wrong in my steps. I start with $188 \times 528 $ matrix $X$, where I have 188 samples and 465 features. I have a response variable $Y$ of length 188 comprised of on...
What are the relation and differences between time series and linear regression? I have a strong grasp of linear regression, and a beginner's grasp on time series analysis; I know the Box-Jenkins method and understand the concepts. To solidify this understanding, I would like to compare and contrast the two methods to ...
(I am completely editing my post. The root question is the same, but I am now posting simulated data to illustrate my issue). I ran (I beleive) the same model in both proc mixed and R (lmer) but have gotten slightly different results. I have simplified my problem from a previous post. In this example, I have created a ...
Given 2 joint groups Bernoulli trials: $X_i \sim p_i$ and $Y_i \sim q_i$, where $(X_i, Y_i)$ are binary outcomes of the $i$-th experiment, and $(p_i, q_i)$ are the probabilities of $X_i=1$ and $Y_i=1$ respectively. $p_i$ and $q_i$ are functions of a random variable $r_i$. In the $i$-th experiment, $p_i$ and $q_i$ are c...
I am new on predictive modeling and for me it is not clear if nested cross validation is applied to full data set (all data I have) or just to traning data. For exemple, if it is applied to full data set, the outer CV is related to testing/training data and the inner CV to analysis/assessment data into the training dat...
Let's say you have a data set with GPA (dependent variable) and Amount of alcohol, Amount of study, IQ, and SAT score as the independent variables. And you want to perform the principal component analysis in R for dimension reduction. In the csv file you read in R, do you have to have GPA or do you have to remove it?
I'm aware that the formula for calculating the standard error of a difference between two means is `sqrt(SD1^2/N1 + SD2^2/N2)` Whereas for calculating the standard error of a mean is just sd/sqrt(n). This question comes from Open Intro Statistics free online book: 5.37 Prison isolation experiment, Part I. Subjects f...
Suppose I have a a probability distribution that I know to have a continuous differentiable unimodal pdf, with pdf(x) strictly greater than zero for all x in the positive half-plane. In addition, I have a black box that provides me with the CDF, pdf and quantile value for any given x. However, I do not want those thing...
Say we wish to generate i.i.d samples from a distribution with density $f(x)$, and we do so using rejection sampling. How can "verify" that the generated distribution is "correct"? I.e can we use something like KS to test for the closeness of our generated distribution to our desired one, using only the fact that we kn...
just a quick question I was a little unsure about. Any thoughts much appreciated! Say I am running an 2 condition experimental trial where one of the outcomes is a z-score (e.g. cognitive test measured pre and post each condition). To make the results more 'meaningful', would it be Kosher/correct to calculate the % dif...
I am currently comparing RNNs to CNNs on multiple criteria and I've come across something I find rather weird. I have a 3dCNN and an LSTM. Both take a 29x30x60 input and classify it to 2 classes. For the LSTM the input is flattened per timestep so it receives a 29x1800 input. The LSTM has +- 250k parameters. The 3dCNN...
One of the images that i recently noticed on the internet that compares machine learning and Deep learning is this: What I understood from it is, deep learning performance is not limited when we increase the amount of data for learning "training" .. So, is this feature restricted to the specific structure of a model!...
i'm struggling finding the right orders of this model. This is a lag=4 seasonally and regularly differenced series(italy trimester exportations), can you help me with it? These are the correlograms. I tried with a (0,0,1)x(0,0,1) and it fitted but i'm not sure. Thanks
Assumptions I consider an A/B test where there is a control group and a variant group. Each observation can either be true (converted) or false (not converted). I evenly and randomly split the incoming users to the two treatments. So, the results can be summarized in a contingency table: | | Converted | Not conve...
I am running a regression of local area unemployment on health outcomes. Initially I had intended to make use of a linear model. But now I am going to make use of a random effects estimator in a logit model. I was able to describe the notation for my linear model quite easily, but I really don't know what this models n...
For a uniformly or Guassian distributed $M\times N $ matrix. Is there any analytical expression in terms of $M$ and $N$ to estimate the maximum and minimum bounds of correlation between the columns of the matrix ?
Is there a way to directly calculate the linear regression coefficients in R but by using a different (quasi)-norm instead of the Euclidean?
When comparing 2 proportions, I've seen 2 ways the standard error can be calculated. The first I've seen is: $$ SE = \sqrt{SE_1^2 + SE_2^2} $$ The second one is: $$ SE = \sqrt{\hat{p}(1-\hat{p})(\frac{1}{n_1} + \frac{1}{n_2})} $$ Under what circumstances would I use the first one vs the second one? What I'm trying to...
If you decrease the maximum depth that the random forest can reach instead of letting the RF to fully grow, what happens to the performance and Overall Accuracy (OA) of the RF? As I have tested the OA decreases. What is the reason?
Let's say we want to estimate the system $x_{1,t}=\phi_0+\phi_1 x_{1,t-1}+\phi_2 x_{2,t-1} +\epsilon_t$ $x_{2,t}=\gamma_0+\gamma_1 x_{1,t-1}+\gamma_2 x_{2,t-1} +\eta_t$ Do we gain anything be estimating using a VAR method in terms of consistency, standard errors of the estimates, power of the tests, etc. as opposed to ...
I have a few questions regarding on how diversity is defined since I've seen differing definitions in different papers. In the paper "Measures of Diversity in Classifier Ensembles and their Relationship with Ensemble Accuracy" by Ludmila I. Kuncheva (2003) I saw this definition: When classifiers output class labels, t...
I am trying to use an OCSVM for my time series data which looks like this: Time Speed_of_Vehicle Direction Lane ------------------------------------------------------------ | 00:00:21 | x mph | North | 1 | | 00:01:12 | x' mph | North | 3 | ...
My question is very similar to a question on stackoverflow and this one on crossvalidated but I would like to have more details. I have some data and I want to check the amount of error I would have if I assume that these data follow an exponential/Poisson distribution (I'd like to have the parameters estimate if possi...
I'm trying to convince my boss that we should consider using machine learning in our field (oncology). We study brain tumours, roughly 90% die within a few years. I wanted to compare the performance of logistic regression, random forest and GBM for classification. My results show that there is no noteworthy difference ...
I have a simple question on how the permutation of a predictor is done in calculating importance of a predictor in Random Forest. As per my understanding, I have a OOB sample of size 100 and a predictor p1 which is allowed to take only 5 values (1,2,3,4,5). Then I have 100^5 possible permutations of p1? The process is ...
For a binary model with Y as the dependent variable and X1, X2, and X3 as independent variable, my understanding is that the predicted value is the value of Y at specified values of of X1,X2,X3. Ex. if LPM is Y = β1∗X1+β2∗X2+β3∗X3+ϵ. The predicted value (Y) for X1 = X2 = X3 + 1 is β1+β2+β3. For expected value, is it th...
I'm running a non-linear regression model where my outcome variable is $Y$ and my dependent variables are $GDP$ and $Population$. Sometimes, I want to include $GDP/Population$ (i.e. GDP per capita). So that my model converges faster, I standardize my variables (i.e. subtract the mean and divide by standard deviation) b...
1) I would like to know if the value Pearson Correlation r obtained in running a Correlation between two dependent variables will be the r that is obtained in a regression correlation (the square root of R-square). 2) Is it statistically correct to say that "a regression analysis was conducted to examine the Pearson Co...
Here are the 2 CCA (Canonical Correspondence Analysis) plot I'm trying to interpretate. I did them using the appropriate function in xlstat. I want to know how I should interpretate the fact that in the first CCA (Proteobacteria) "salinity" and "depth" vectors are located in II and III quadrant and are almost orthogo...
I am trying to map my basic understanding of MLP's to CNN's. Why does a CNN sacrifice all negative inputs with the ReLU over the sigmoid. Is it because: The sigmoid has a range of between zero and 1 which is worse for CNN's than 0 to infinity. Is it to do with the fact the function only has one horizontal asymptote? ...
In some machine learning problem, we have objects represented as feature vectors $X$. We want to cluster them. We want some features of $X$ to have no influence on the clustering. Call $X_1$ such a feature. Of course we can just remove it but it is most often strongly correlated to other unknown features, so that remov...
In the recent nature paper "Mastering the game of Go without human knowledge", how do they incorporate game rules into the convolutional neural network? What is not clear to me is that whether the moves proposed by the convolutional neural network always adhere to the game rule or not.
I got a question regarding the binomial distribution and testing for significance in general. I need to divide a dataset into a treatment group (with phone call) and a control group (no phone call). My boss told me I need to divide it based on significance tests. However, I told him that's not possible if no one has be...
I have a data set with ~1,000,000 time series which I want to forecast using R. It is monthly data and I have 36 observations of each, and I want to forecast for one year (h=12). Each time series represents the demand for a certain product in a certain country. Several countries together form a region, so this is hiera...
I want to model an unobserved, increasing (non-stationary) AR(1) process in a Bayesian setting $$X_t= 1.2 X_{t-1} + \epsilon_t$$ How does one model the residuals, $\epsilon_t$ to ensure that $X_t < X_{t+1}$ always? One possibility is to consider $\epsilon_t \sim \text{Exp}\left(\lambda\right)$. Also what prior does one...
I have a time series that has a non-normal distribution and I'd like to find out if it's mean (or drift of the cumulative sum) is statistially significantly different to zero. I know that if the time series has a normally distributed return, I could use a pared t-test, but since in my case I would violate that assumpta...
I have a pre-post dataset with 2 observations per subject (propotion data -bounded between 0 and 1-). I have analyzed the data with a classical dependent t-test under the NHST paradigm. However, as data does not follow normality and I have a relatively small sample size (i.e., 10 subjects), the p-value may be unreliabl...
I have recently build a simple LSTM-Network to predict a sinus function, which worked fine. Now I wanted to fit a sinus function containing a linear part with the same network but the results are disappointing. The code below generates the data, trains the network and prints the resulting graph and the training histor...
I was wondering if there is any literature available on training systems, which may show exploding gradients (e.g. recurrent neural networks), by using non-gradient based optimization methods. As far as I understand the problem, exploding gradients lead to regions with very high ascend (ridges) in the error surface, wh...
I trained a LibSVM classifier, with scaled features in the interval $[-1;1]$ with this equation: $$x'=2\frac{x-\min x}{\max x - \min x}-1$$ I am happy with the trained model and its accuracy on the testing data, and want to use my model on new data as I receive it. I receive 1 new row of feature data, and want to pred...
I have fit my experimental data (about 50 analysis) to the same model using two diferente methods. The model is of the type: $ y = A + B * (x^C) $. I obtained my results as two tables with the columns A, B, C, RSS, chi2 for each one. Now I wanna compare the results to see if there is agrément between the methods, i.e...
Let $X,Y$ be nonnegative random variables with cummulative distribution functions $F$ and $G$ respectively. Then $X\le_{\text{st}}Y$ iff $1-F(x)\le 1-G(x)$ for all $x\ge 0$ annd $X\le_{\text{mrl}}Y$ iff $$\frac{1}{1-F(x)}\int_{x}^{+\infty}(1-F(u))du\le \frac{1}{1-G(x)}\int_{x}^{+\infty}(1-G(u))du$$ for all $x\ge 0$. (A...
Why do we use Non-negative matrix factorization?What is the advantage and superiority of other matrix decomposition methods?
I have a OLS model under the timeseries framework. Apart from several independent variables I have one which is a lagged version of the Y variable. Is LOOCV on this model valid? It seems to be not ok but is there any justification as in references for (or against) performing LOOCV on this type of model?
I've been building a Wasserstein GAN in Keras recently following the original Arjovsky implementation in PyTorch and ran across an issue I've yet to understand. To my knowledge, the critic network is first trained on a real batch of data, then trained on a batch of data generated from a noise prior via the generator. T...
I am conducting a meta-analysis and I am extracting pearson's correlation coefficient (r) from studies in order to meta-analyse them. Some studies have not used correlations so I am having to calculate r from the statistics they report. One study has reported a logistic regression, is it meaningful to squareroot r2 to ...
In all the example of linear regression model I have studied X is taken as fixed value ( midpoint of interval). Can we have a regression model in which X is in interval form and how this will affect regression analysis. And how this will affect condition mean.
I'm running a LASSO regression on a continuous outcome, and am standardizing the features. Should I standardize the outcome as well? Specifically I'm using the glmnet R package.
I am working on a dataset with many categorical variables for a clustering problem. I've done one-hot encoding where a categorical column with 5 levels will become 5 columns, each has the standard deviation of 1 after standardization. I am thinking of using PCA to cluster data to describe characteristics of data in eac...
I have a continuous variable that measures violence in many geographic areas across four time points - four years. I want to use this data to say in a simple manner for each region, whether or not - in general - violence is decreasing or increasing over time. Here is an example of two regions over time: region1 <- c(3...
I have the following data. Feature 1... Feature 15 is a set of explanatory variables. I have a group variable Med_group to show the two different possible medication received by patients. And then a outcome variable Days_being_healthy as the number of days being healthy. Feature1 Feature2 … Feature 15 Med_...
In the last couple of weeks I have been reading about regression and I wanted to get some feedback on this idea since I have not found any material covering it. Imagine a non-linear function $y = f(X)$ that maps inputs $X$ from $\mathbb{R}^n$ to $y$ in $\mathbb{R}$, where $n \geq 1$. It should be possible to linearly i...
I want to aggregate Google Trends data relating to separate queries that share a thematic category - e.g. "beer" and "wine". I don't care about the relative popularity of the terms - it is more important to capture the geographical distributions and trends over time - so I can work with the raw 0-100 normalised data f...
there is the exercise 5.30 from the book A First Course in Probability and Statistics from Rao. What I have read is that a joint normal PDF is more an exception than a rule here: Is it possible to have a pair of Gaussian random variables for which the joint distribution is not Gaussian? But I can't rule out to see how...
Let $(\Omega, \mathscr{F}, \mathbb{P})$ be a probability space; let $X: \Omega \to \mathbb{R}$ be a random variable; let $A \in \mathscr{F}$; let $1_{A}$ be the indicator function of $A$. Now is there an established (in some sense) term for the expectation $\mathbb{E}X1_{A}$? A phrase like "the mean of $X$ over $A$" se...
How can we, in a constructive way, justify the concept of a continuous random variable and its PDF starting from the PMF of a discrete variable and then proceeding in the limit using infinitesimals? (Don't want it in epsilon delta calculus, but actually using infinitesimals).
The title says it all -- how many trainable parameters are there in a GRU layer? This kind of question comes up a lot when attempting to compare models of different RNN layer types, such as long short-term memory (LSTM) units vs GRU, in terms of the per-parameter performance. Since a larger number of trainable paramete...
While reviewing for a stochastic processes exam, I came across the following proof in Introduction to Stochastic Processes with R by Dobrow. The proof is for the theorem that the expected number of times an irreducible Markov chain visits a state $j$ starting from a state $i$ is given by the Markov chain's invariant di...
Would that be just a probability over a bivariate real random variable, one representing the real part and another representing the imaginary part? How can I formally take moments of the complex random variable (just take moments separately and combine both moments, one of the real part and another of the imaginary par...
Monte Carlo method, from what I could gather, allows one to obtain observations/draws from a possibly unknown statistical distribution. Let's say $T(X)\sim F$, where $T$ is a statistic, $X$ is a random vector, and $F$ is possibly unknown distribution. The method is composed of the following steps: Draw ${x_i}$ from a ...
I have fitted a binary logistic regression model with two explanatory variables: $x_1,x_2$ using fractional polynomials (60k observations)(https://cran.r-project.org/web/packages/mfp/vignettes/mfp_vignette.pdf). The regression function and its transformation of the variables suggests $\text{logit}(p(x)) = -7\times10^{-...
In Principal Component Analysis, what is the justification for the assumption that the covariance matrix is always a diagonalizable matrix? What happens when the covariance matrix is not diagonalizable, i.e. its eigenvectors do not span the complete vector space?
I have two groups of test persons that manually created multiple annotations for different underlying, unknown values (each person created multiple annotations). I'd like to find a statistical test that tells me with a given confidence level that the annotations by the two groups are of the same quality. Quality being ...
I have the correlation coefficient(square of Pearson's r) between two signals X and Y measured from different locations say M1,M2,M3 and M4 on the body.The experiment is done on 4 subjects. The values are tabulated as below. The highest correlation for each subject is highlighted in red. I wanted to know if I can make ...
I am trying to compute the following expectations: (i) $E\left[\frac{1}{a^X}\right]$, (ii) $E\left[\frac{X^2}{a^X}\right]$, (iii) $E\left[\frac{X}{a^X}\right]$. In above, $a$ is a constant and $X$ is a Gaussian random variable with mean $\mu$ and variance $\sigma^2$. My attempt on (i): $$E\left[\frac{1}{a^X}\right]= E...
In a Bayesian setting and given data $D$ I want to test the hypothesis that $$H_0: \theta_2 \le \theta_1$$ against alternative $H_1: \theta_2 > \theta_1$. Assume I can only sample from the posterior distributions, e.g. with MCMC. In particular I can sample from the posteriors $p(\theta_2|D)$ and $p(\theta_1|D)$. In a...
I have a Pearson correlation of r=.30 between two variables - x and y. Now, I want to see whether this relationship changes as a function of variable z. I then calculated the following regression y~x+x:z (using lm in R). The standardized beta coefficient for the effect of x jumps to 1.07, and the x:z interaction coeffi...
I have the following recursive linear model $X = \varepsilon_1$ $Z = \beta_2 X + \varepsilon_2$ $Y = \beta_3 Z + \varepsilon_3$ By solving the model its easy to see that $E[Y|X, Z]$ is linear too. But what happens in the nonlinear case? Let's say I assume Z and Y to be Probit (or Logit, Poisson, etc) $X = \varepsilon_1...
$X \sim N (1,4) ;\, Y= 2X+1;$ And now does $Y$ have $N(1\times2+1,\, 2\times4+1) = N(3,9)$ ? Is it valid? And if so why ? Or how do I get y's distribution? Because when I run the following in R, it yields x = dnorm(1,1,4) # [1] 0.09973557 y = dnorm(3,3,9) # [1] 0.04432692