instruction
stringlengths
9
38.7k
I am performing classification on an imbalanced dataset (70% negatives). If a prediction is negative I take a specific action otherwise an opposite one. As in both cases some costs are implied, I want to assess how good the model is at detecting each class. To do so, I am calculating TP/(TP+FP) and TN/(TN+FN), along th...
I know the following influence function for a M-Estimator: $IF(x_0,T,F_0)= $ $\frac{\psi(x_0)}{\mathbb{E}_{F_0}[\psi'(X)]}$ where $F_0$ is the centered model ($F_{\theta}(x)=F_0(x-\theta)$) I am interested in knowing the influence function for the general model: $IF(x,T,F_{\mu,\sigma})$ I know that it must be $IF(x,T,F...
I'm using matchit package to create a propensity match. I'm trying to match control and treated with a 2:1 ratio in order to maximize the population and exclude less patients as possible (13.000 patients available). I have found two possible ways and I am wondering which one is better: method=nearest, ratio 2:1, min.c...
I am attempting to recreate the results of the paper written by King, Stock and Watson in 1995: Temporal instability in the unemployment inflation relationship. The paper estimates a VAR model with 12 lags using data on inflation and unemployment. They mention that they obtain in sample RMSEs for forecasts at the 6, 12...
As the title stated, $X_n$ converges to $X$ in distribution. $Y_n$ converges to $Y$ in probability. Does $(X_n, Y_n)$ converges to $(X,Y)$ in distribution? If not, if we make the condition so that $Y_n$ converge to $Y$ almost surely, does $(X_n, Y_n)$ converge in distribution to $(X,Y)$?
Popular python libraries for topic modeling like gensim or sklearn allow us to predict the topic-distribution for an unseen document, but I have a few questions on what's going on under the hood. I've read a few responses about "folding-in", but the Blei et al. LDA paper the authors state. " An alternative approach is ...
I was reading this paper when I stumbled upon two-staged PCA; apparently it divides indicators into sub-indices because empirical evidence supports that PCA is biased towards the weights of indicators which are highly correlated with each. I was wondering how to make sense of the step by step process and how to perform...
I want to evaluate factors influencing the time to degree for college students in their master's degree with panel data. The dependent variable is time to degree in months (reference: student is still studying). However, I must respect the time to college dropout as a competing event. The data is in person-month (long)...
In section 4.7.7 of Introduction to Statistical Learning (version 2), the authors code regression contrasts where the last level of a predictor sums to the remaining levels. My question is, why doesn't the coefficient for this last level (e.g. mnth12) show up in R's summary output? The authors note that it's not report...
I have two replicates (tanks) for 4 treatments (hyperthermia, hypoxia, combined hyperthermia and hypoxia, and control), with 10 randomly assigned organisms for each tank. The response variable is non-normal. I have tested for treatment effect through Kruskal-Wallis H and Mann-Whitney U test (Wilcoxon) as posthoc analys...
Given some probability space $(\Omega, \mathcal{F},\mathbb{P})$, $F_{n}$ some filtration, and $X_{n}$ some martingale with $\tau$ stopping time. We know some major things such as $\tau$ is finite almost surely, $\mathbb{E}|X_{\tau}|$ is finite, and $\lim_{n\to\infty}\int_{\tau>n}|X_{n}|d\mathbb{P}=0$. The goal being to...
I collected data among individuals- I took noted screening results they had within the last year, collected a baseline screening, and another follow up 3 week screening. I’m comparing the 3 screenings to determine changes (does more frequent screenings teach us anything?) I’m thinking chi-squared? But not completely su...
Explaining my dataset: I have a univariate timeseries dataset of energy consumption. Each row of the dataset are half-hourly records of the energy consumption of a consumer. So every 48 lines contain 1 full day of measurements of a single consumer. So, for example, the first 48 rows (rows 1 to 48) of the dataset contai...
I am wondering the best approach to plot what I want. I have 4 dataframes of data (2 types of data with 2 replicates for each type). To tis point, I've just been choosing he best replicate of each type and plotting that. However, I think to be more accurate, I should include both replicates in each line. What is the be...
For some reason my model keeps showing up to be a poor model when checking its accuracy through confusion matrix and AUC ROC. This is the model i stuck with after doinf backward elimination this is the logistic output: `Call: glm(formula = DEATH_EVENT ~ age + ejection_fraction + serum_sodium + time, family = binom...
Are all terms in the first line(71) of the equation random variables or probability density functions? If they are probability density functions, is there a possibility of obtaining a value that is not equal to 1 when integrating the right-hand side of the equation after all calculations have been completed? Based o...
Suppose I have data in R that looks like this. This data represents measurements of different patients over a period of time (discrete level): df <- data.frame(patient_id = c(111,111,111, 111, 222, 222, 222), year = c(2010, 2011, 2012, 2013, 2011, 2012, 2013), gender = c("Male", "Mal...
I'm starting to get a little confused about how R knows which variable is the main variable and which others are simply controls. For example, let's say there are three variables Y, X1, and X2, and I'm mainly interested in X1. I regress Y = constant + X1 + X2 + error. The function of X2 is to block any indirect effect ...
I would like to know if there is any drawback to increasing K in K-fold CrossValidation, except the computational one.
I have run model selection and have been advised to use the BIC value to determine the best model for my purposes. However, having looked around online I cannot seem to find a standard way to report results, even published papers have different ways of reporting them. Could someone please tell me how to report the BIC ...
I am seeking an expression of the Jensen-Shannon Distance (JSD) between two normal distributions that only uses the respective means and standard deviations. The continuous version of the JSD (in nats) is given as: $$\sqrt{\frac{1}{2}\int_{-\infty}^{\infty} \left(f(x)\ln\frac{2f(x)}{f(x)+g(x)}+g(x)\ln\frac{2g(x)}{f(x)...
Cohen's d and Hedges'g effect sizes are used when two distributions have equal variances, which is a requirement and assumption to use these statistical tests. When two distributions have unequal variances, Glass'delta should be used instead, putting in the equation only the standard deviation of the control/pre-measur...
I came across a paper which reported the following results Accuracy Specificity Sensitivity 97.49% 93.6% 94.3% It seems unusual for accuracy to be higher than both sensitivity and specificity. Is this an error in reporting? I looked at this question which suggests that this is possible for precision and rec...
I'm relatively new to causal inference, so please be gentle. I have the above DAG, which represents the following variables: G: exposure variable, two factors (control and treatment) S: Pre-treatment variable, Continuous PT: Post-treatment variable, Continuous Y: Outcome of interest, Continuous Is there a way to est...
Introduction: Archaeological research often involves drawing conclusions about past societies and cultures based on a limited number of artifacts or findings. In some cases, such as the study of synagogues in the Levant, the number of findings may be significantly smaller than the number that existed during the period ...
I would like to test the difference between two classification outcomes for statistical significance using McNemar's test, but I am unsure how to best account for multiple comparisons. The setting is as follows (see plot below): I have obtained two classification accuracies based on the same dataset (solid line vs. das...
I'm studying regression bootstrap procedures for my thesis, and have stumbled something which I find difficult to understand. Consider the standard normal linear model $$ Y = \beta x + \epsilon \,, \qquad \epsilon \sim \mathcal{N}(0, \sigma^2) \,, $$ and suppose we want to simulate the distribution of the response $Y_+...
In this answer @ttnphns writes Both eigenvectors and loadings are similar in respect that they serve regressional coefficients in predicting the variables by the components (not vice versa!) , and in a footnote adds that Since eigenvector matrix in PCA is orthonormal and its inverse is its transpose, we may say that...
I'm studying economics and learning statistical topics only related to my fields. In my textbook I read this formula for likelihood function, and I can't follow the rule. $Y_t | Y_{t-1},Y_{t-2},\dots,Y_{-p+1} \sim N(0,\sum)$ $f(Y_t | Y_{t-1},Y_{t-2},\dots,Y_{-p+1},\theta)=(2\pi)^{-n/2} \sum^{-1/2}exp[(-1/2)(Y_t)'\sum^{...
I am reading T. Chen, C. Guestrin, "XGBoost: A Scalable Tree Boosting System", 2016 (arXiv), which is seemingly full of typos. They propose the so-called "approximate algorithm" (Algorithm 2 below) and justify it as follows (section 3.2): However, it is impossible to efficiently do so [Algorithm 1] when the data does...
I am following the derivation of Variational Bayes approach in David Blei's lecture notes, particularly equations (13 - 16). In particular, the line: $$ = E_q [\ \log_2 q(Z) ]\ - E_q \left[\ \log_2 \dfrac{p(Z, x)}{p(x)} \right]\ $$ $$ = E_q [\ \log_2 q(Z) ]\ - E_q [\ \log_2 p(Z, x) ]\ +\log_2 p(x) $$ In particular, ...
If we draw independent samples $x_0\sim N(0,\sigma^2), x_i \sim N(\mu_i,\sigma^2)$ for $i \in \{1, 2, \cdots, N-1\}$, what is the probability that $|x_0|$ is the smallest among all samples $|x_i|$'s? Under what condition is $|x_0|$ the smallest almost surely? I was trying to calculate $\mathbb{P}[|x_0|<|x_i|]$ for some...
I am trying to understand how to incorporate noisy gradient information in Gauss Process Regression using a Bayesian framework and I need your advice. I am following the following approach: Let $\mathcal{D} = (x,y)_i$ be noisy data and let $\mathcal{D}_g = (x_g,y')_j$ be noisy gradient observations. The joint prior sho...
This is my data. It has no gaps in survival or the used predictor - for the sake simplicity in this example. I want to see, if multiply generated the same dataset will give - after pooling - the same results as the raw approach. Of course my REAL data will have some gaps. The gaps will occur in a few variables, used to...
I'm implementing Newton's method for a simple logistic regression model but I keep getting very large values for the inverse of the Hessian matrix. I am using the standard formulas found in books... I'm pasting a working example: import numpy as np from math import log, exp obs_x = np.array([0, 0, 0, 0.1, 0.1, 0.3, 0....
I am interest in the constrained L1 Lasso problem: $$\min_{\beta\in \mathbb{R}^p:\sum_{i\in[p]}|\beta_i|=1} \|X\beta -s\|^2, (1)$$ for design matrix $X\in \mathbb{R}^{n \times p}$ and target $s\in \mathbb{R}^n$. In particular, I am interested in the setting where there are more features than examples, i.e. $p>n$ (and ...
For $(X_1,X_2)$ ~ $Normal(\mu, \Sigma)$: $$E(X_2|X_1)=\mu_2+\rho*\sigma_2\frac{X_1-\mu_1}{\sigma_1}$$ I am trying to derive the $E(Z_2|Z_1)$ for $(Z_1,Z_2)$~$LogNormal(\mu, \Sigma)$. I guess I could calculate $E(Z_2|Z_1)$ as follows: $$E(Z_2|Z_1)=\int\frac{f_{Z_1,Z_2}}{f_{Z_1}}*Z_2*dZ_2$$ but this seems too complicated...
This question has been asked before but I'd like to come back to it because I point a precise issue out. Suppose we want to estimate a function $f\left( x \right)$ from data $D = \left( {\left( {{x_1},{y_1}} \right),...,\left( {{x_n},{y_n}} \right)} \right)$ with ${y_i} = f\left( {{x_i}} \right) + {\xi _i}$, ${\xi _i}\...
Currently, I am working on a research project that involves forecasting electricity consumption using data mining. In my analysis, I have detected the change point for time series using the changepoint package for my data sets using the "AMOC", PELT," and "BinSeg" methods. For each method, I have used var, mean, and me...
In decision theory, given a family of distributions $(P_{\theta})_{\theta \in \Theta}$ on the data space $\mathcal{X}$, the risk $R_L(\theta, \delta)$ of an estimator $\delta$ for a given loss function $L(\theta, d)$ is given by $$R_L(\theta, \delta) = \int_{\mathcal{X}} L(\theta, \delta(x)) \, dP_{\theta}(x)$$ I have ...
In a seminal article in virology ('Sur l’unité lytique du bactériophage' Comptes rendus des séances de la Societé de biologie et de ses filiales, 1939, 130, pp. 904-907) the Nobel prize winner Salvador Luria applied the Poisson distribution to demonstrate that one bacteriophage particle was sufficient to lyse a culture...
I am running models, and I am learning how to use LIME to explain the models. I trained a random forest, on data that has 988 rows and 5000 columns. However, I am getting an error which says Error: All permutations have no similarity to the original observation. Try setting bin_continuous to TRUE and/or increase kernel...
I am studying Elliptically Symmetric Distributions and someone recommended me Symmetric Multivariate and Related Distributions by Fang (1990), which is the book I am reading for that purpose. I know that if $X\sim N(\mu,\sigma^2)$, then $|X|$ follows a folded normal distribution. So, I wonder if there exists some gener...
I have a hidden Markov model. $X_n = e^{-b\times dt}\times X_{n-1} + \sigma_v \times V_v$ $Y_n = X_n + \sigma_w \times V_w$ where $b$ is the model parameter, $\sigma_w$ is the standard deviation following Gaussian noise. How to find the conditional probability of $b$ given $X$ and $Y$ from $n \in {1,2,\dots, k}$? I thi...
I need to run an analysis in spss, please could you advise me on that matter? I gave my examples, please correct me.. three groups: control, body positivity, body neutrality, measure: self esteem, body image, social comparison hypotheses: H1: Participants who view body neutrality messaging will have higher scores ...
Suppose we have a one-sample binomial proportions problem with a small number of trials (say 5–10 trials). I want to conduct inference and come up with a p-value for testing $p\neq p_0$ for some $p_0$ prescribed proportion. What are some ways to do this? Is there a Fisher's Exact test analogue for one-sample? What abou...
Suppose our dependent variable Y is TRUE vs FALSE, and our independent variable X is GREEN, YELLOW, and RED. We performed a logistic regression of Y~X. I wonder if it is possible and how to use the trained logistic regression to answer the following question: What is the odds ratio (and p-value) of TRUE vs FALSE for s...
I am looking at a fertility dataset and have the following variables: kids is 1 if a mom had more than 2 kids, 0 otherwise. multi2nd is 1 if the 2nd and 3rd children are twins, 0 otherwise. age is the age of mom. agebirth is the age of mom at time of the birth of her first child. blackm is 1 if mom is black, 0 otherwi...
If I am comparing where there are any significant differences in the number of damaged apples between apple types, what kind of statistical test should I use? There are 5 types of apples with different sample sizes. Apple Type Number of observed apples Number of damaged apples Granny Smith 2500 233 Fuji 2000 ...
The Capital Asset Pricing model proposes that, $$ R_i=R_f+\beta(R_m-R_f) $$ where $R_i$ is the return of the i-th asset, $R_f$ is the risk-free rate and $R_m$ is the Market returns. $\beta$ is generally estimated using simple linear regression, but the covariates are random variables which violates the assumptions of r...
Disclaimer: I am not a statistician, but a computer scientist working a lot with probability distributions. I am asking this question to help me understand how statistical frameworks and terminology can be applied formally to the reasoning below. Consider the following example, e.g. borrowed from a tweet of E. Yudkowsk...
I have a question about the implementation of Cox Time Varying Regression model, that I need to perform to understand the impact of co-variates on my survival prediction. I found an example here (https://lifelines.readthedocs.io/en/latest/Time%20varying%20survival%20regression.html) but I still have a doubt. My dataset...
I have a question regarding 2SLS and interaction-terms between the predicted endogenous variable and a set of exogenous variables (second stage). I want to calculate the effect of an endogenous variable (X) on the dependent variable (Y) in interaction with a set of exogenous variables (X2 + X3 + X4). Normally, without ...
I am working on a project where I am evaluating different machine learning models to be used as scoring functions during in-silico docking. It is a regression problem where the 3D structure data of a protein bound to a ligand is used to predict the binding affinity of the complex. I have a training set of ~3600 example...
The soup analogy is, You only need a single spoon to sample the soup, provided it is well stirred. It has been used several times here Sampling distributions of sample means and What is your favorite layman's explanation for a difficult statistical concept?. It is also referenced on other websites, for example Soup ...
I am conducting a retrospective cohort study to determine the association between receiving medicine X with death during the first 100 days of therapy for patients with leukemia, from 2010-2020. Starting in 2015, all patients began receiving medicine X on Day 10 (t=10) of therapy to prevent infection, whereas nobody re...
I am calculating elasticities per income quintiles. I have 10,000 observations of elasticities calculated for each quintile, so a dataset of 5*10,000. I would like to test whether the elasticities are stat. different per income-group. How should I do this? Can I calculate the mean over all samples and use the Wald-test...
For SPSS is rating knowledge of a nutrient on a scale of 1-10 ordinal or continuous scale variable ? In my questionnaire I stated that 1=poor knowledge of the nutrient while 10=excellent knowledge of the nutrient
Let $\mathbf{X}=\{X_1, X_2, \ldots, X_n\}\sim\mathcal{N}(\mu, \sigma^2)$ and $\mu$ is known. Does $\frac{\sigma^2_{\mathbf{MLE}}-\sigma^2}{\mathbf{se}(\sigma_{\mathbf{MLE}}^2)}$ is asymptotically normal and why? I know $$\sigma_{\mathbf{MLE}}^2=\frac{1}{n}\sum_{i=1}^{n}\left[X_i-\mu\right]^2$$ and $\frac{n\sigma_{\mat...
In reviewing my notes about making causal inferences under the selection on the observables identification strategy, I reviewed some pieces that make critiques against contemporary strategies in observational settings that use regression adjustment. I'll use Samii 2016 as an example although the arguments made in this ...
Suppose I am performing a propensity score matched analysis using the MatchIt package in R, following the example reported here: https://kosukeimai.github.io/MatchIt/articles/estimating-effects.html library("MatchIt") #Create dataset 'd' as reported at the bottom of the example---- gen_X <- function(n) { X <- matrix(...
I wrote the following code in Python. First I generate some data: # generate data x1 = np.random.normal(10, 5, 1000) x2 = np.random.normal(20, 5, 1000) error = np.random.normal(0, 1, 1000) y = np.exp(3*x1 + 6*x2) + error X = np.stack((x1,x2)).T Then I pre-allocate some variables: weights = np.ones(np.shape(X)[1]) lear...
I'm performing hyperparameter tuning for a classifier. After I finish, I'm updating the hyperparameter search space and re-tuning the hyperparameters again. I repeat this process a few times. In addition to the validation set used for hyperparameter optimization, I use a separate test set for final evaluation. Is it a ...
I am currently reading about stochastic processes and Brownian Motion. When books have notation such as $E[X_t] = 0$ and $Var[X_t] = \sqrt{t}$ this is considered over sample paths. However, when we consider the distribution of the increment $X_t - X_s \sim \mathcal{N}(0,|t-s|)$ what random variable is this exactly? Is ...
I am facing a multiclass classification problem where I have 4 classes and one of them dominates over the others. I use a KNN classification model and the majority of the instances are being classified as the majority class. I used the weights = 'distance' parameter and it did improve, but not all what I expected. I kn...
We have a shuffled, standard 52 card deck with 4 Aces and 4 twos. I am confused about the probability of seeing an ace before seeing a two. By symmetry, it seems obvious that the probability should be $0.5$, since the probability of seeing one before the other is equal. But when I think of it this way: given the order ...
I did time-dependent covariate analyses with cox regression in R. But I wonder if the interpretation is the same as for a cox model with a fixed covariate? Context: in my analysis the physical activity score index was analyzed 5 months after their lung cancer remission period and then 5 more months after that, i.e. 10 ...
Question: Is there a known, exact expression for the Bayes factor between two multivariate normal hypotheses? Let $H_1$ and $H_2$ be two subsets of $R^d$ with normal priors $\pi(\mu|H_j)$. The sets $H_j$ represent two hypotheses for the unknown mean $\mu$. The Bayes factor is defined as $BF=P(X|H_1)/P(X|H_2)$, where $X...
I know that P(Y=y|do(X=x)) is different from P(Y=y|X=x) in that the former is an interventional probability where the intervention is applied to the entire population, whereas the latter is a straightforward conditional probability where we simply condition on X taking on value x. But how would we read something like P...
I have ran the below linear regression model and using the performance package in R I however checked whether the distribution of the residuals is normal. The performance package suggests I should be using a Cauchy distribution for the errors. In a search of stats.stackexchange and Google, it isn't clear how to do this...
To visualize p-values or confidence intervals, the t-distribution is sometimes rescaled using the sample standard deviation and then centered at a certain value. To be more specific, consider drawing a random sample of size $n$ from a normal distribution with mean $\mu$. The random variables $M$ and $S$ denote the samp...
I have a dataset with around 1M data. But, in real-life it should be more. From the dataset after first step processing for specific task, I got 50K data. Then I processed it again for a specific attribute value (continuous), got around 7K data successful. I was thinking of one-sample t-test considering population is u...
I have been handed data that is interval censored where left censoring is limit of detection and right censoring is saturation of the assay. How do I estimate the means and mean standard errors of this data?
Is there a known symmetric distribution with finite 1st moment but undefined or infinite for moments>1?
Say you're fitting a generalized linear model where the response variable is weight and there are several factors: height, sex, vegetarian, country where the person lives, etc. Now say you expect there to be an interaction between height and country. Does the way you account for this in the model depend on how many lev...
I recently read a paper and the authors run a survey experiment that had 4 groups, including a control group. The author writes the following: "The treatment about better responding to economic crises has no systematic effect on exchange rate policy preferences. In addition, the estimated effect from T1 is larger than ...
I was wondering how you would find the Yule-Walker equations for an AR(2) (or, really, any AR(P)) stationary time-series model, where there is a "missing" term. For example: $$ X_t - \phi\frac{1}{4}X_{t-2} = \epsilon_t $$ Where $\epsilon_t \sim WN(0,\sigma^2)$.The "missing" term is the $X_{t-1}$. Writing the Yule-Walke...
Cross-posting from stackoverflow I am working with a dataset having the following structure (download data here). The variable resp is a physiological response measured once for every subject during the study. In the study, each subject was observed for 5 days at 10 time points. The variables vala, valb, valc, vald ar...
A comment to this question suggests that the OLS estimate of linear model parameters is unbiased, even when the error term is Cauchy. Given that Cauchy distributions lack an expected value, I am skeptical that the parameter estimates have an expected value (though I am on board with their expected value being the true ...
I am running a logistic regression. Treatment is a factor with 3 levels. I am assuming that intercept is one of these 3 levels (negative control in this case). Is there a reason the equation is splitting the predictor variable like this? Call: glm(formula = propgfp ~ treatment, family = quasibinomial, data = frass4glm)...
I have a Markov kernel $Q$ from which I would like to generate proposals for the Metropolis-Hastings algorithm. The problem is: When the proposal is accepted, the "internal state" of $Q$ changes. This means that if proposals $y_1,\ldots,y_n$ are accepted, the internal state of $Q$ depends on $y_1,\ldots,y_n$. I know, t...
I have fitted a Bayesian GARCH(1,1) model with Student $t$ innovations to some time series data, $X_1,...,X_n$ and now want to estimate Value-at-Risk (VaR) (i.e., 5% quantiles) at each times $t=1,,...,n$. To do so, I'm using bayesGARCH in R, which returns an mcmc object from which I can obtain samples from the posterio...
I have allele frequencies from two independent studies Study Number Sample Allele 1 Freq Allele 2 Freq Allele 3 Freq A 20 .45 .475 .075 B 34 .72 .28 NA The weighted average of each allele frequency is as follows Allele 1 Freq avg: .62 Allele 2 Freq avg: .355 Allele 3 Freq avg: .075 The estimated diplo...
Suppose I would like to develop a machine learning model from 10 datasets to predict a clinical diagnosis (diagnosed or not). After checking the data, all of the outcome and feature data are similarly distributed in the datasets and it is reasonable to combine these datasets. However, they are discrepant one one featur...
Suppose a dataset as follows: data <- data.frame(X = c(1.2, 1.5, 1.7, 1.8, 2.0, 2.2, 2.3, 2.5), Y = c(3.2, 3.5, 3.7, 3.8, 4.0, 4.2, 4.3, 4.5), technique = factor(rep(c("A", "B"), each = 4)), county = factor(rep(1:4, times = 2))) data X Y technique count...
For example: poisson.test(x = 170,T = 70,r = 3,alternative = "two.sided",conf.level = .95) Exact Poisson test data: 170 time base: 70 number of events = 170, time base = 70, p-value = 0.005157 alternative hypothesis: true event rate is not equal to 3 95 percent confidence interval: 2.077216 2.822335 sample esti...
I am trying to find the best US state using 25 columns of normalized data (best = 1, worst = 0) such as crime rate, GDP, house prices, and others. This results in a 50x25 Excel table. Afterward, each state is given a score by adding the products of each variable with its respective relative weight. Here's a simplified ...
after obtaining the posterior draws(N=1000) for parameters for a bayesian VAR Model. how do we select the single parameter among 1000 draws that best depicts the posterior distribution
Suppose that I want to evaluate the following integral: $$A = \int_0^1 \log\left(\theta^s(1-\theta)^{n-s}\right)p(\theta)d\theta,$$ where $p(\theta)\equiv$ Beta$(ws+1, w(n-s)+1)$ and $n$, $w$, and $s$ are known constants. How would I go about evaluating this integral analytically?
A machine model is tested in the factory to check the acceleration coefficient. The experiment selects n machines of this model and measures the distance traveled by the machine in 38 seconds. It is assumed that path measurement errors are independently equally distributed and have a distribution of 1/2 - exp(1). Const...
In [1], Ogle & Barber discuss a method for ensuring identifiability of certain Bayesian multilevel regression models; they call this method "post-sweeping". I have a couple of related questions stemming from this method/approaches like it. Setup Consider the varying-intercepts model, $$ y_i \sim N(\beta_0 + \beta_{g(i)...
Let $X_1,...,X_n$ a i.i.d from a population with distribution $U[0,\theta]$, i.e., $f_{X_i}(x)=\frac{1}{\theta}g_{[0,\theta]}(x)$, for $i=1, \ldots, n$ where \begin{align} g_{[0,\theta]}(x) = \begin{cases} 1 & x \in [0, \theta], \\ 0 & x \notin [0, \theta]. \end{cases} \end{align} How to prove that $\hat\theta = \max\...
I'm working on a time-dependent dataset, where basically I have two different populations and we're building Markov chains to describe their behaviors. What I'm trying to do is compare the transition matrices associated to the two populations, and decide whether the transition matrices are really different, or whether ...
I am checking the conditions for hypothesis testing a Pearson correlation as significant or not, and also checking the residuals normality conditions for OLS. Why are the following methods giving different results (why are the variables not bivariate normal but the residuals of an OLS model are normal?)? Also, why does...
Suppose I have pre-treatment samples and post-treatment samples for a group of patients. Let the treatment effect on each patient be the difference between the two sample means. Now I have a new treatment and I want to test whether this new treatment has the same treatment effect, i.e. does the sample mean difference f...
I'm using data (secondary analysis) to conduct an exploratory analysis. I have a sample size of $n = 67$, and the exploratory analysis includes two independent variables and four dependent variables. I am assessing how each of the two independent variables correlates (partial correlations) with the four dependent varia...
I am trying to compare the accuracy of a polynomial model and a Random forest regression model in predicting a variable Y but also the integral of this variable , With the polynomial model, it is clear how to compute its integral, however, I am wondering if applying a numerical integration over the prediction range wil...
It is known that a linear function compounded with a squared loss is convex, so one can efficiently find the optimal solution when performing linear regression. Specifically, given a data point $(x,y)$ we have the loss function $$f(w)=(w^Tx-y)^2,$$ which is convex in $w$. I'm wondering if there exist other functions th...
Let's look at an example: We want to know if our new jogging shirt reduces the amount of sweat produced by runners. Ten factory employees in Bangkok, Thailand are recruited to try out the prototype by jogging for 30 minutes and recording the amount of sweat on their foreheads. Ten office employees from Vancouver, Cana...
Let $X_1 = U(0,1)$ and $X_2 = U(0,1)$. $X_1$ and $X_2$ are independent. Then $f(x_{1}, x_{2})=1, {0}\le{x_1}\le{1}, {0}\le{x_2}\le{1}$. Let $Y_1 = \arctan(X_{2}/X_{1})$, $Y_2 = X_2$. I need to find the density function $g(y_1)$. Here's what I've done so far. $X_{2}/X_{1} = \tan(Y_{1})$ $X_{1} = X_{2} / \tan(Y_{1}) = X_...