instruction
stringlengths
9
38.7k
I am calculating a generalized linear mixed model (GLM) with a two-column (n successes/failures) binomial response using the the lme4 package in R. The link function used is the default logit link. The model itself works perfectly and the results obtained are reasonable. I was just wondering two things: (i) how does t...
I have a series of datasets of pairs of variables. I would like to measure how non-linear the relationship between the pairs of variables is. The correlation coefficient is not good enough because it doesn't really consider discontinuities in the dataset distribution, which is something I'm very interested in capturing...
I recently worked on Variational(VAE) Autoencoder. For me, Autoencoder works like this: In the loss function, we have a reconstruction error term which allows us to minimize the distance between input and output. a regularization term which allows us to match the latent variables(z1,z2) to a unit gaussian distributi...
I'd like to apply a t-student test to compare diferent samples to reference one using R but first I'm checking if my data meets the requirements for t-test so I removed outliers using the function rm.outlier() from Rcmdr R package and performed a Shapiro-Wilk test to check if replicates and the reference data are norma...
A colleague of mine suggested the following procedure for a categorization problem: 1) Train a random forest 2) Select only the records from the training data set which the random forest predicted correctly (based on in sample predictions) 3) Train a random forest on this subset 4) Use this random forest to make predic...
The Bayes optimal classifier (BOC) is defined as follows. When data $D$ is given, the classifier returns the value $$\text{argmax}_{y\in Y} \sum_{h} P(y\mid h) P(h\mid D)\text{,}$$ where the $Y$ is a set of possible values of the discrete target variable, and the sum goes over all classifiers, which are here referred t...
The betafit package in R allows beta regressions to be fit with either a constant precision parameter (controlling the variance of the distribution about the estimated mean $\mu$) versus allowing the precision parameter to be conditional on predictors. In one analysis I obtain a log-likelihood of 10000 vs 10500 without...
I currently have a data set where the response is compositional with many components. I am considering lumping some of the components together. I believe this will make it easier to spot the potential effect that some independent variables may have on the components. The specific effect on each component may be insigni...
Background The Gelman & Rubin (1992) convergence diagnostic requires $M$ MCMC chains to be run, each starting from an over-dispersed estimate of the target population. It then computes a diagnostic based on the between and within-chain variance (this post provides a good summary). Ensemble MCMC samplers, in particular...
Reading the interesting post Interpretation of variance in multilevel logistic regression I understood that I cannot compare multilevel logistic models looking at the empty model and at variance reductions (as I would have done in multilevel models with a continuous dependent variable). The suggestion is therefore to u...
I have a an MCMC sample file containing a list of points in parameter space. I have the value of the parameters in my model at each point, and the likelihood at each point. Of course I also have the prior ranges for each parameter. How can I calculate the model evidence? I mean it's just an integral of the likelihood...
I have a time series dataset for forecast using Holt-winters model, but my problem is the time series contains breaks or change point, Should we remove the first break? Or is there any other solution for managing breaks in the Holt-Winters model? Knowing that by removing the first breaks data the error rate of my mode...
I was reading the FaceNet paper and in the 3rd paragraph of the introduction it says: Previous face recognition approaches based on deep networks use a classification layer trained over a set of known face identities and then take an intermediate bottleneck layer as a representation used to generalize recognitio...
I am just new at R and I am trying to predict food prices. When I run fit1<- lm(buptemp$price~buptemp$year) predict(fit1, interval = "predict") I get results of my training dataset. I have tried predicting from a different dataset and I get the same result. How do I test using a different dataset with similar objects ...
Assuming I have 3 normally distributed random variables with different variance and mean: $ X\sim N(\mu_1, \sigma_1^2) $, $ Y\sim N(\mu_2, \sigma_2^2) $ , $ Z\sim N(\mu_3, \sigma_3^2) $ According to this post, I know how to calculate the probability $P(X<Y)$. Now I'm interested in the probability that X is smaller ...
For my exam I was given this statistic model: $Y_i$=u+(1+a$x_i$)∗$ϵ_i$ where $u$ is an unknown parameter with all real values, $a$ is an unknown parameter in with values between ]-1;1[, $e_i$ is iid and N(0,1) , $x_i$ is known numbers between ]-1,1[ , But what does it tell? Is $Y$ normally distributed? I know that...
I am doing logistic regression in r and want to give the best features to the model from a list of 200 variables and 25,000 records. A continuous variable(scc) is having 90 % 0’s. Following is the summary. Min 0 1st Qu: 0 Median: 0 3rd Qu: 0 Max: 130 The rest 10% which are non-zero ranging from 1 to 130 and have c...
Is one of these statements correct for Gauss copula? For normal marginals Pearson correlation equal to Spearman correlation Pearson correlation is less or equal than Spearman correlation
At one of the examples of Deep Residual Learning for Image Recognition paper, figure 4, leftmost graph it's said that thin curves denote training error and bold curves validation error. Throughout most of the training though, both the thin teal and red lines (training) are higher than the bold ones (validation) in th...
I have a computer model which reproduce the behaviour of a physical system we want to control. The model includes a bit of fluid dynamics, heat exchange, pressure calculations etc. Inputs include both prior information like pipe geometry and real-time information like how we choose to control pumps. I would like to bu...
I am working on a text clustering problem. The data contains several sentences. Is there a good algorithm which reaches high accuracy on short text? Can you provide good references? Algorithms such as KMeans, spectral clustering does not work well for this problem.
Suppose in a logistic regression a one unit increase in a linear dependent variable corresponds to an odds ratio of 1.61. The 95 % confidence interval ranges from 1.19 to 2.54. JMP calculates the confidence intervals for "range odds ratios" exponentially so that a 11 unit increase corresponds to an interval from 1.19^1...
Thanks in advance for your answers, I'm trying to decompose a stock price using the Rssa package provided in R, after millions of trials, I tried to change the window Length and the eigentriples, the error between the forecast and the test series is really High, as definition the Window length should be chosen between ...
I would like to know whether hyperparameter optimization should be done before feature selection or after. If I do it before feature selection, I guess, I will choose better features (as the classifier is tuned). But most pipelines on internet (google for machine learning pipeline) always put optimization at the end. ...
I do realise (some of) this has already been addressed here (e.g., Why do we need multivariate regression (as opposed to a bunch of univariate regressions)?, Explain the difference between multiple regression and multivariate regression, with minimal use of symbols/math, and Defining a univariate regression). Neverthel...
I have a list of participants who all gave answers to three variables. I created scores for each answer i.e: a smiley face = 5 to a sad face = 1 I then added up these scores for each participant, for each variables. For example for one participant, I have scores of 47, 40 and 39 for each of the variables. Obviously 47 ...
I understand that the error term is supposed to be the difference between the value produced by the population regression model / function and the actual observed value, but what is this 'actual observed value'? The reason I am confused, is because it is also said that the mean of the error terms is equal to 0 (as the ...
In a finite state Markov Chain , show that there exists $M>0$ and $0<\lambda<1$ such that for all the transient states $i$ and $j$ , we have $$p_{ij}^{(n)}\le M\lambda^n$$ I guess $\lambda$ should be something like $\max\limits_{i,j\in S}p_{ij}$ (I might be wrong) , but I have no clue abut $M$. $S$ is set of transien...
I have about 170 samples. Each sample has a dependent variable of between 0 and 1, representing the incidence of an unseen characteristic. The samples are of different sizes. For each sample, the population is distributed across 65 different categories. I am trying to find a model that can predict the incidence, given ...
I am confused on which type of "object" do the VIF functions operate. Let me give two examples, which are confusing me. The VIFs from the car and AED libraries are purportedly doing a very similar thing. However: 1) The vif() command in the R package car calculates VIFs based on the model (for example, a linear model)....
I am comparing few classifiers and I am slightly confused now. I will call the classifiers A, B, C. If I draw ROC curve, and estimate AUROC, the result points that the classifier A is the best and the classifier C is the worst. If I draw dependency of the accuracy on the criteria (position of threshold) and integrate t...
I'd like to get a prediction interval (or a good measure of dispersion) of my data but it seems like standard deviation is not the right way to do it because my data is not centered (or not normally distributed), look at the image below: The grey lines on the background represent my data, blue dashed (upper and lower)...
I run a Cox model with 2 covariates, in addition to the variable of interest. For one covariate, the assumption of proportional hazards is violated. I know different methods developed to cope with non proportionality in Cox models but they seem to be restricted to the case when the violation of the assumption of PH con...
Given the following stochastic process: $$X_t = \epsilon_t\epsilon_{t-1}~~~~,~\epsilon_t \sim N(0, \sigma^2)$$ Which is the variance of the process $X_t^2$? Firstly I defined the process $X_t$ as: $$W_t = (\epsilon_t\epsilon_{t-1})^2= \epsilon_t^2\epsilon_{t-1}^2$$ Then its expected value as: $$E[W_t]= E[\epsilon_t^2\...
Situation I'm working on a problem where I'm using sensor data to predict machine failure before the failure happens and I need some advice on which methods to explore. Specifically, I want to identify indications of impending failure prior to the failure actually happening. Ideally this would be with enough lead time...
Analyses based on iterative model fitting or simulations are typically seeded with an unpredictable random value based on a PRNG function plus the program / computer state. This causes analyses to return different results each time, unless the user remembers to hard-code a random seed into their analysis. It can lead t...
In analogy to a similar post on continuous data, I ask the following. In paired discrete data, we test the frequentist hypothesis of equivalent marginal distributions of two discrete variables $X$ and $Y$ with the McNemar test. For example when both variables are dichotomous with cell probabilities $$P(X=i,Y=j) = \pi_...
When we are modeling non-negative data with linear regression we often log-transform the dependent, thereby ensuring that all the predictions made by the model will be positive as well. Does it make sense to do the same when using Gradient Boosted Trees (GBTs)? For Random Forests the output is an average of the trainin...
Quite new to distribution analysis, I'm puzzled what to do with the adjustments data's : I have response times from a 3 conditions pairwise experiment. I have quite a hard time before succeeding an analysis of the distributions that lead me to choose an ex-Gaussian adjustment which fit quite well my distributions (usin...
I've ran linear regression with square-root transformed dependent variable. Due to negative skew of the dependent variable, the formula for data transformation prior analysis was as follows: NewVar = SQRT(147 - OldVar). Now I have the transformed regression data. I wish to know what kind of equation I need to do in ord...
I have just got back a manuscript with a comment from a reviewer that has been puzzling... I am getting data for two neuroimaging modalities (A, B). For each modality I have information for 8 regions of the brain. Moreover I have baseline and follow-up data for 16 patients. Therefore 256 observations. The reviewer is a...
I'm trying to find whether there's a correlation between two variables using Chi Square test and Fisher's Exact test. I get two different p values when I run Chi Square test and Fisher's Exact test. Which value should I take? Take Chi squared p value and do not reject H0 or take Fisher's Exact p value ad reject H0? I r...
I have sample data below for 10 groups and I report the number of observations (count), mean and standard deviation below. group= 1:10 count = c(41,640,1000,65,30,4010,222,277,1853,800 ) mu = c(.7143,.66,.6441,.58,.7488,.5616,.5507,.5337,.5513,.5118) sd = c(.2443,.20,.2843,.2285,.2616,.2365,.2408,.2101,...
I have a cohort of 1185 breast cancer patients - 40 patients are <40 years old, and 8 patients developed local recurrence (2 of which are <40). I want to see if there is any association between age <40 years and the risk of local recurrence. Are these numbers too small to do such analysis? When I try to run KM analysis...
I have two time series X and Y and their correlation. If I am given x at a particular time, how do I find out what y at that time should be? Is it finding the expected value of y, E(Y|X=x)? If so, how do I do it? Thanks
I have an imbalanced dataset (99%-1%) and am trying different approaches to optimize the F1 score. My question is about SVM and the possible difference between tuning the Cost parameter and to use SVM as a the cost sensitive learner. My guess is that: In Cost sensitive learning the misclassification costs for the mino...
Let $X_1 \cdots X_n$ be a random sample from a distribution $f(x) = e^{-(x-\theta)}, x>\theta, -\infty<\theta<\infty$. Let $Y_1 = \rm{min}\{X_1 \cdots X_n\}$. Is $Y_1$ unbiased for $\theta$? I'm stuck on finding the expected value of $Y_1$. I have the pdf as $f_{Y_1}(y) = n e^{-n(y-\theta)}$, but cannot find the integr...
I am using GLM for modeling the binary data. For the predictive variables I am using different number of Zernike Basis functions. To test how many Zernike basis functions I need, I am using AICc/BIC to choose the best model. For example, I use k={1,2,3,...,20} basis functions and AICc chooses the model which has k=5 ba...
Why haven't VGG's config (https://arxiv.org/pdf/1409.1556.pdf) one max pooling layers after each conv layers?
I am using cost matrix for an unbalanced set -70% (not enrolled: 0)-30% (enrolled:1) : error_cost <- matrix(c(0, 1.5, 1, 0), nrow = 2) I have not being able to runprROCR = predict(SfEnrollModel12,Samford1316_test,type="prob")[,2], which I think would give me the probability for each prediction; is that right? The only ...
Say I have a set of $N$ distinct and independent sources of noise. Each source, $X_{n}$, follows a normal distribution with individual means and variances. \begin{equation} X_{1}\sim\mathcal{N}\left(\mu_{1},\sigma_{1}^{2}\right), X_{2}\sim\mathcal{N}\left(\mu_{2},\sigma_{2}^{2}\right), \dots, X_{N}\sim\mathcal{N}\left(...
I am struggling with formulating a multilevel model for my analysis and would really appreciate if you could give me some insight. This is a 3-level model where the response (Y), exposure (X), and other covariates I will control for, are all numerical. Y is an individual (level-1) variable, I have no level-1 variable t...
I have 4 conditional correlation matrices $C_1, \ldots, C_4$. I want to test each entry in the $k$th matrix, say $\hat{r}_{ij}^{(k)}$, against a reference value $r_{ij}^{0}$ value in a matrix $C_0$. I do this by checking whether $$-n_{k}\log\left[1 - (\hat{r}_{ij}^{(k)} - r_{ij}^{0})^2\right] > 3.841$$ which is the cr...
What is the relation between correlation and time-series signal complexity? For example, I was reading a paper that is talking about the Multi scale entropy (MSE) and its advantages over the Shannon entropy. They present two signals, the first one is white noise signals and the second is long-range correlated white noi...
Suppose I have a toy example for linear regression set.seed(0) n_data=50 true_coeff_b1=0.37 noise_ratio=0.13 conf_int_level=0.77 x=runif(n_data) y=true_coeff_b1*x+noise_ratio*rnorm(n_data) fit=lm(y~x-1) summary(fit) confint(fit) Whats the relationship between Std. Error and Confidence Interval (as shown in red boxes...
I have a mean score of 28 out of 30 and a sd of 12 for a multiple choice test of intelligence , does this mean the test is too easy?
I carried out a binary logistic regression using glm. Below you can see the (modified) output. I included -1 to display all values, even the baseline which is used as reference category. My questions would be: 1) There are still some groups missing: For example "stfwrk" (there are 7, it only shows 6), or "Statemply...
This comes from Fivethirtyeight's riddler weekly challenge... Toddler poker is played by two players. Each is dealt a “card,” which is actually a number randomly chosen uniformly from the interval [0,1]. (It could be 0.1, or 0.9234781, or 1/π, and so on.) The game starts with each player anteing a buck. Player A...
I'm having what would seem to be quite a general and widely applicable problem but I can't find literature on the subject. Example problem: Imagine I have medical records of thousands of patients (including binaries such as smoker/nonsmoker, continuous variables such as age, height, blood pressure, categoricals such as...
What are some practical applications of the distributions of the components of an SVD of a matrix of normals? In particular, assume $Y \sim N_{n \times p}({\bf 0}, \Sigma \otimes I)$, i.e. the rows of $Y$ are iid $N({\bf 0},\Sigma)$. Then the SVD of ${\bf Y = UDV}^T$. We can study the marginal distributions of ${\bf U...
In the Marvel Movie "The Avengers," there's a scene in which Bruce Banner, looking for a piece of alien technology called the "tesseract," says that he is going to "rough out a tracking algorithm, just a basic cluster recognition." Is this a coherent thing to say? I'm a novice in statistics, but I have heard of cluster...
I would like to apply reinforcement learning method to a complicated problem which has a lot of action. And each action also has a different operating time. It means the time to switch to the next state is different for each action. I don't know how to design this experiment. Do I need to regard operation time as the p...
I tried to use the definition: $$\displaystyle φ(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^x e^{-{s^2}/{2}}\,\mathrm ds$$ So, according to this site: $$\int \:e^{-{x^2}/{2}}\mathrm dx=\frac{\sqrt{\pi }}{\sqrt{2}}\text{erf}\left(\frac{x}{\sqrt{2}}\right)+C$$ But by definition: $${\displaystyle \operatorname {erf} (x)={\...
Given 2 square-symmetric covariance matrices whose sample sizes are not equal, can the following equation be used to compute the combined covariance ? I have been reading this article on wiki https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Covariance but was wondering why the equation below is not rig...
Consider $\hat\theta_a$ and $\hat\theta_b$ are uncorrelated, unbiased estimators of $\theta$. In addition, the variance of $\hat\theta_a$ is twice that of $\hat\theta_b$. Show that for any constant $k$, the weighted average $\hat\theta_a(k)+\hat\theta_b(1-k)=\hat\theta_c$ is also an unbiased estimator of $\theta$. Ho...
Consider a situation which is modeled by the Poisson distribution, $P(X_i=k|\theta)=\displaystyle\frac{e^{-\theta}\theta^k}{k!}$. Find: (a) The MLE of $\theta$. (b) The MSE of the MLE. (c) The approximate distribution of the MLE from the Central Limit Theorem. Okay, so I think I solved (a): $f(X_1,X_2,...,X_n|\theta)=...
Given the following generative model $$T | \mathbf{x_i} \sim \operatorname{Exp}(\lambda_i)$$ $$\ln(\lambda_i) = \beta_0 + \beta_1 x_1 + \beta_2 x_2 + \dots$$ That is: I have observations of covariate/response pairs $(\mathbf{x}_i, t_i)$, such that $t_i$ are measurements of inter-arrival time of events, and is assumed t...
Consider a variable $X$ which is modeled by the probability density $p(X|\theta)=\displaystyle\frac{\theta x + 1}{2}$ for $-1\leq x \leq 1$. Find: (a) The MLE of $\theta$. (b) The MLE of $\hat\theta$. (c) The bias of the MLE. Okay, so for part (a): $\begin{align} f(X_1, X_2, ..., X_n | \theta) &= \displaystyle\frac{n+...
In the Metropolis-Hastings Algorithm, one usually considers a symmetric proposal distribution: $$ J(\theta^*|\theta^{(s)}) $$ where $\theta^*$ is a proposal point and $\theta^{(s)}$ is the accepted value at iteration $s$. The symmetry states that: $$ J(\theta^* = \theta_b|\theta^{(s)}= \theta_a) = J(\theta^* = \theta_a...
Suppose that $y_1, y_2$ are data drawn from a density function $f$ with parameters $\theta_1, \theta_2$ which are unknown. Suppose I applied some prior on $\theta_1, \theta_2$. Then, the Gibbs sampler states that if we know the FULL conditional distributions: $$ p(\theta_1|\theta_2, y) \ \ \ \text{and} \ \ \ p(\theta_2...
Consider a bandit problem in which you know the set of expected payoffs for pulling various arms, but you do not know which arm maps to which expected payoff. Can you design a regret minimizing algorithm that will achieve better bounds than UCB? My intuition for solving this problem is, to use UCB for a while and get...
I am doing a research about NLP and I am using RNN (Recurrent Neural Network) or CNN (Convolutional Neural Network) to encode a sentence into a vector. When using CNN, the training time is significantly smaller than RNN. It is natural to me to think that CNN is faster than RNN because it does not build the relationship...
In the Metropolis-Hastings Algorithm, it is stated that if we have an acceptance ratio $r = \frac{p(\theta^*|y)}{p(\theta^{(s)}|y)}$ where $\theta^*$ is our new point and $\theta^{(s)}$ is our old point, that $$\theta^{(s+1)} = \theta^* $$ with probability $min(r, 1)$ and $$\theta^{(s+1)} = \theta^{(s)}$$ with probab...
I have a question regarding the average value of the pairwise product of 2 ordered samples that are drawn from a random variable, $X$, which in this case is zero-mean Gaussian ($X \sim N(0,\sigma_x) $). Let $x_1, x_2, ... x_n$ be $n$ samples drawn from the random variable $X$. Let us put these samples in ascending ord...
Background information Suppose we have a dataset for a competition in 2016 here. +-------+------+------+------+ | Round | X1 | X2 | Rank | +-------+------+------+------+ | 1 | .586 | .329 | 1 | +-------+------+------+------+ | 1 | .111 | .171 | 2 | +-------+------+------+--...
Let's assume that we have samples of two independent Bernoulli random variables, $\mathrm{Ber}(\theta_1)$ and $\mathrm{Ber}(\theta_2)$. How do we prove that $$\frac{(\bar X_1-\bar X_2)-(\theta_1-\theta_2)}{\sqrt{\frac{\theta_1(1-\theta_1)}{n_1}+\frac{\theta_2(1-\theta_2)}{n_2}}}\xrightarrow{d} \mathcal N(0,1)$$? Assume...
My set up is as follows: I have a predictor x, that predicts the levels of y. Along the way, there are two moderator variables that may affect the strength of the x-y relationship. I am at a loss at how to go about trying to find if there is a moderating effect, and how strong, since there are two moderators instead ...
We're given a seasonal time series $y_t$, representing a certain metric used to measure a system's performance. The measure has a positive trend, and a considerable seasonal influence. We also know that, between $t_1$ and $t_2$, a number of changes were done to the system with the goal of improving performance. Our tas...
I'm working with neural networks. I have a number of inputs to the network which is far greater than the number of training instances ($\sim 7k$ inputs vs $700$ samples, $1$ order of magnitude, number of outputs $2k$). My question, as a newcomer to neural nets, is this: Should I diminish the size of the input layer ...
Consider the following problem: there are two variables, $X_1,X_2$ with some latent connection. Given a training data, $(x^i_1,x^i_2)_{i=1}^m$, we need to come up with a model that predicts $x^i_1$ given $x^i_2$ and vice versa. That is, in the future we will receive with probability $0.5$ the value of $X_1$ and and see...
Suppose that I have the following PDFs well-defined: $$ f_A(A), f_B(B|A), f_C(C|B,D), f_D(D) $$ From these PDFs I can deduce the following direct dependence relation: $$ A \rightarrow B \rightarrow C \leftarrow D $$ Given the above, on what grounds can I be sure that the joint probability function is correctly written...
I have the data from several countries (including my country). My problem is to compare the data from "population" (all countries) with data from my country, to answer the question: is my country a representative sample from the population, in other words, are we "similar"? So, I generate the confidence intervals from ...
Based on my understanding, panel fixed effect model is equivalent to OLS with individual dummies. However, when I ran the two models in R, the $R^2$ from the two models were quite different: 0.8 for OLS with individual dummies and 0.06 for fixed effect model. Is it the case that in fixed effect model, the fixed effects...
I have two pictures of a similar scene, and want to recognize whether it is the same scene, photographed in different times and possibly from slightly different angle. For instance, whether it is the same beach (maybe photographed from different angles and at different times) or two different beaches? Is it the same pl...
In the Metropolis algorithm, suppose I start my algorithm at time $t-1$ with a draw $\theta^{t-1}$ from my target distribution $p(\theta|y)$. It can be shown that $\theta^t$ and $\theta^{t-1}$ are symmetric in that $$ P(\theta^t = \theta_a, \theta^{t-1} = \theta_b) = P(\theta^{t-1} = \theta_a, \theta^{t} = \theta_b) ...
I am building a model to explain performance in one time period to another. I have my variables and then I have an interaction effect for those variables in the second time period. Using this data, I can then say what is the change in performance due to the change in these values ( this is split by the change in ave...
I wonder whether I can use AIC for model comparison in this scenario: Model 1: A = a + b + c B = d + e + f C = g + h + i Model 2: A = a + b + c B = d + e + f (The third factor with his indicators is missing) The AIC for the second model is much lower. I’m unsure of applicability, because a latent variable and t...
An average is a substitute for a complex group of variables but it is not always safe to depend on the substitute alone to the exclusion of individual measurement of groups.How safe is the average?
My research is about password safety. As dependent variable I have the number of attempts a software needed to crack the respective passwords. This results in values in a range from approx. 1e+5 to 1e+12. Unfortunately a substantial part of the passwords couldn't be cracked by the software but I would like to integrate...
The USGS uses a Log Pearson Type 3 (LP3) distribution to model flood frequency based on cubic feet per second (cfs) annual maximum flow data (AMAX). The result for a gauging station is the three parameters mu, sigma, and gamma (mean, sd, and skew). I have many sets of these values. However, it is usual to express river...
OK, so I have no problem with the Bayes' theorem itself and I do think that I get a lot of the simpler maths around Bayesian statistics. However, I am struggling with the idea of treating population parameters as random variables. Say someone tosses a coin. Before the toss, I estimate the probability to be 0.5. Coin la...
Say I have a model: log(Y) ~ X1 + I(X1^2) 1) Do I still need to take the log of Y if I am using the quadratic of X. I thought we need to take log to linearise the relationship between Y and X and therefore we don't need to include the squared term of X1. In a way, which of the following three models is the right mode...
If I have a grid of Chi-squared values for a grid of 5 values for 1 parameter and 5 values of another parameters (5x5), can I then create a contour plot for the confidence regions? X=np.linspace(0.01,0.1,5) Y=np.linspace(0.01,0.5,5) and Z is 25 values of the chi-squared for each fit using different parameters in a 5x5...
Most of the time-series data I'll be looking at is linear and uniform - a straightish light parallel to the x-axis. The exceptions I need to find are those that deviate recently, the last one, or two entries. These will probably be quadratic or exponential in their deviation from the straight line. Running scipy's curv...
This is more of a conceptual question, but as I use R I will refer to the packages in R. If the aim is to fit a linear model for the purposes of prediction, and then make predictions where the random effects might not be available, is there any benefit to using a mixed effects model, or should a fixed effect model be u...
I need to analyze the answers of a questionnaire where participants reported a set of motivations for the adoption of a technology. Motivations are ordered by importance and are not pre-defined. Eg. participant 1: 1) M1, 2) M2, 3) M3 participant 2: 1) M4, 2) M1, 3) M2, 4) M5 participant 3: 1) M2, 2) M2, 3) M4 We...
For example, if X follows a standard normal distribution,, what is the probability of P(X<=0.145) by using the above table only? Is it possible to tell? I remember I once encounter this situation in an exam long time ago, but I don't have a definite solution for this. Certainly, P(X<=0.145) should be between P(X<=0.14...
I have a question about model selection using cross validation. As far as I understood from many other replies related to model selection here, one should use nested cross validation in order to properly (1) select and then (2) assess a model. But almost all these questions were about relatively small data sets, so I ...
Let $Z\sim\mathcal{N}(0,1)$. Let $X$ be a random variable defined as $X:=ZI_{Z>0}$, where $I_{Z>0}$ is an indicator random variable for the event $\{Z>0\}$. How do I find $\mathbb{E}[X]$? Here's my attempt. Let $\Omega$ be the sample space on which $Z$ is defined. The random variable $X$ is a product of two random va...
What would you go for in assessing collinearity - correlation or VIFs? Say you run pairplots and calculate Pearson correlation coefficients between pairs of explanatory variables. Two of them have a correlation coefficient of around 0.8, which is rather high. This would suggest that including both variables in the same...