instruction
stringlengths
9
38.7k
What is known about the distribution of the random variable $X$ that is a cubic form of independent central and noncentral normal variables $$X\sim y_1 y_2 y_3- y_1 x_1 x_2 - y_2 x_3 x_4- y_3 x_5 x_6+x_1 x_4 x_5 + x_2 x_3 x_6$$ with $y_i\sim\mathcal{N}\left(\mu_i,1\right)\\x_i\sim\mathcal{N}\left(0,1\right)$ Maybe som...
in the experiment the subjects had to choose between answer A and answer B in 3 different settings. The question is, if there is a significant preference for answer A in any of the settings. Can I just do a binomial test for all of the 3 settings? Or is there a way to link these 3 tests? Is there a multiple comparisons...
Apologies in advance for asking what is probably a very basic question, but I have zero knowledge of statistics. I made 8 discrete entries to a contest. The contest had 1,649 discrete entries. The contest selected 10 entries. 2 of those entries were mine. What is the statistical probability of this occurring?
I took a test earlier this year where I couldn't fully answer to one question. I wanted to post it here together with my reasoning to see if I can now get it. Let $$X_1, X_2,X_3\stackrel{iid}{\sim}Ber(0.5)$$ And $$Y_1=2X_1-1;\;\;\;\; Y_2=2X_2-1;\;\;\; Z_1=Y_1*X_3;\;\;\; Z_2=Y_2*X_3$$ I was first asked to check if $Y_1$...
I did a study in which participants were randomly divided into 3 conditions, each of which completed a different memory test (with different difficulty levels). Additionally, all participants did an IQ test. I want to know if memory results are different depending on the test they did, while controlling for IQ and gend...
When performing regression to estimate coefficients, the interpretation of the coefficients is symmetric, this means that for both positive and negative effect, the magnitude is the same. For considering asymetric coefficients in a multivariate approach in regression tasks, which will be the best approach? At the momen...
Let's say we have three employees. Their salary is 2000, 2500 and 6000 USD. Due to inflation each employee got an increase of 500 USD. 2000 -> 2500 USD: 25% increase. 2500 -> 3000 USD: 20% increase. 5000 -> 5500 USD: 10% increase. Can HR department say the average salary increase was 18.33% by calculating (25+20+10)/3?...
So I've come across a tricky dataset which comprises of several participants who read a vision testing chart using first their right eye, then the left eye. Each line of the chart has 5 letters and as they read down the letters on each subsequent line get smaller (just like a normal opticians letter chart). I have a da...
I am aware that there are several questions about feature/split selection in gradient-boosted trees (e.g. If a feature has already split, will it hardly be selected to split again in the subsequent tree in a Gradient Boosting Tree) but in my opinion, they do not address this concrete problem: During an investigation of...
If I create a variable that indicates missingness in a dataset. What is the reason a professor would use ANOVA with chi squared to compare whether it is significant over just looking at the summary output and seeing that the p-value is the same? Please let me know if I'm posting in the incorrect location. This is the R...
I have this R script. I want to estimate the coefficient of the dependent variable Y based on several regression. set.seed(0) n = 1000 X_1 <- rnorm(n) X_2 <- rnorm(n) Y <- X_1 + 100*X_2 + rnorm(n) #linear regression: reg1 = lm(Y ~ X_1) reg2 = lm(Y ~ X_2) reg3 = lm(Y ~ X_1 + X_2) Results: > summary(reg1) Call: lm(fo...
I think the answer is already given by this post, but I wanted to check a couple of aspects. A person I know developed a 'cold' after an event with many people. Unfortunately we still have to be wary of Covid in such cases, so he took a first antigen test, which came up negative, and then another one the next day, whic...
Consider models such as DeepAR, ngboost and other frameworks to the general problem of predicting the parameters of some parametric distribution with some black-box function, call it f(X). The predicted parameters are chosen to minimize the negative loglikelihood of the assumed parametric distribution. These models, sp...
I want to make a network for making multi-label attribute classifications on images of clothing. This is a simplified case of what I want to do, I have 9 different attribute categories that I wish to detect on the image of a T-shirt: Color, Arm Type, Collar type, Pattern, Fabric Type, Size, Usage Area, and Style. Howev...
If random variable $X\,\sim\,\text{Beta}(a,b)$ and $Y\,\sim\,\text{N}(\mu,\sigma^2)$, is there a closed-form solution for the pdf of their product $XY$? We assume $X$ and $Y$ are independent.
In the experiment 25 alpine skiers did a pretest (3 runs), two training sessions (5 run each) and a posttest (3 runs), during the training sessions I split skiers in two different groups and they trained with two different methods. I have two hypothesis where I think one group will outperform the other one. Learning: ...
I am not sure if "converge" is a proper description of my problem. I'll state it in detail below. I'm working on a CFD problem which means each sample is expensive. The framework I choose to work with is Gaussian Process (surrogate model) + Bayesian Optimization (promise minimal steps in optimization) using Expected Im...
I am trying to estimate the effect of a policy that "should" have affected charitable behaviour within the US. To test this, I have data on daily donations for an NGO from all donors (global) from 2017 to end 2020. The policy in particular affected people from the US from march 2020 onwards. So ideally, I envision sett...
I am looking to solve the following question: Which methods below can improve model fit (MSE) through gradient descent? Use a high learning rate Use stochastic gradient descent Start with a high learning rate, but decrease over time Use a different starting point to avoid possible local minima From my understanding, ...
I am a very basic user and I am gonna ask a very simple question about the size of the coefficients in a logistic analysis. I have run a logistic regression to analyse the probability of an event occurring in a panel of 30 countries with around 1000 obs. I have a binary dependent variable and four regressors. I got the...
When we don't know what's the mean of a normal distribution we try to estimate it and after a time we get lucky and have the true mean (in a magical way). What does it mean the expected value of the estimator equals to the true mean ? How can I have an intuition for the expected value of an estimator? (I know the equ...
I'm curious if anyone has used, heard of, or otherwise considered using Genetic Algorithms as an engine for Variational Inference (VI)? My understanding of VI is that it's an optimization algorithm, powered by gradient descent, which has its largest area of application as a replacement to MCMC algorithms; it frames a s...
I know most people perform feature selection running RFE on a linear regression model, for example, BEFORE training the model with Keras. However is it possible to do it within the training procedure of the deep neural network? If so how? Are there any downsides to it?
I have a typical question if someone can help. Construct two bivariate data sets (choose number of cases to suit yourself), each with correlation above 0.9, so that the combined data set has negative correlation.
For two probabilities vector $r,c\in \mathbb{R}^k$, the optimal transport is to find the joint distribution of $r,c$ such that it $$\min_{T\in P} \langle T,C \rangle\\P\in\mathbb{R}^{k\times x},\text{which is the joint distribution}$$ For a variety of reasons, finding the solution is computationally hard. Hence, on pag...
$P(B|A)\cdot P(A) = P(A|B)\cdot P(B)$ would be so much more intuitive to understand and thus easier to remember.
Let's say we have a function f(x) = ∑k=1N xk2. Why does Quasi Newton take more steps than Newton? Is it because Quasi Newton involves approximation of second derivative which is not that accurate and hence uses some iteration to come to minimal value of function?
I'm trying to characterise the relationship between variable A and B. I know the relationship is confounded by age, and maybe also variable C. The partial Spearman correlation coefficient between A and B controlled for age is 0.33, p=0.02. The partial Spearman correlation coefficient between A and B controlled for age ...
I am reading "Probabilistic Machine Learning" by K. Murphy. In it, he defines the likelihood of a dataset as However, this dataset $D$ is defined as: So if all $x_n, y_n$ are random variables, it would seem that one needs to account for $p(x_n|\theta)$ via conditional probability? I assume this would factor out if as...
I am having problems following the wording of this explanation. Likelihood takes values between 0 and 1. Negative log of this range is between $\infty$ and zero. So when we maximise the likelihood it gets closer to 1 and when we minimise the negative log likelihood it gets closer to 0 "When we maximise the likelihood...
I am an MBA student taking courses in statistics. Today, some of the students from the actual statistics faculty presented a seminar on estimation and probability - it was really interesting! In our own class, we have been learning about concepts such as the "Expected Value" and "Maximum Likelihood", and in this semina...
Let $X_1, X_2, \ldots $ be an infinite sequence of i.i.d. random variables with $E(X_i)=\mu$ and $\mbox{Var}(X_i) < \infty$. The law of large numbers states $\lim_{n \rightarrow \infty} \sum_{i=1}^{n} \frac{X_i}{n} = \mu$. Wikipedia mentions that "other formulas that look similar are not verified". In other words $\lim...
Let X and Y be two independent discrete random variables with PMFs $$\begin{equation} P_X(k)=P_Y(k)= \begin{cases}\frac{1}{5}, & \text{for}\ x= 1,2,3,4,5 \\\ 0, & \text{otherwise} \end{cases}\end{equation}$$ Define Z= X-Y. Find the PMF of Z. My answer with working: $R_X= R_Y= (1,2,3,4,5)$ and $R_Z= (-4,-3,-2,-1,0,1,2...
According to this page, the square & logistic loss functions are "bayes consistent": A Bayes consistent loss function allows us to find the Bayes optimal decision function ${\displaystyle f_{\phi }^{*}}$ by directly minimizing the expected risk and without having to explicitly model the probability density functions. ...
Situation Our use case: demand forecasting for sales and operations planning monthly granularity, ~5 years worth of historical data available goal is to forecast future time windows of 1, 3 and 12 months forecasts are generated twice per month We have a time series forecasting system in place. It uses basic ARIMA a...
I'm working on building my understanding of generalised linear mixed-effects models in R. I have a toy dataset which is an RCT of treatment with aspirin that followed up people over time to track their outcomes, including death. The intervention was clustered by city in this dataset. My current code is: # Import librar...
I have data that follows LogNormal distribution in the body (high density region) of the distribution and it seems like it has an Exponential tail after a particular 'cut' point. Given that these two distributions are parametrised differently, I am curious if there is any way how the discontinuity in parameters can be ...
I have trouble of deciding whether I should go for paired or unpaired test in my case. Let's say that I need to evaluate the performance of two search engine configurations and check whether the performance of Configuration 2 is better than Configuration 1. I can either: compare the search performance on two independe...
I want to build classification machine learning using logistic regression. First i check my model roc_auc score using train test split and check with k cross validation. Turns out there is indication that my model is overfit.. so i decided to do hyperparameter tuning. After i got some best parameter from hyperparameter...
I am trying to understand if the model published in section 4.1.1 here is or is not an Empirical Bayes model (which the author claims it is). Or, maybe, if it is a valid one or not. The model looks as follows: $$ X_i|\theta_i\sim N(\theta_i,\sigma),i\in\{1,2,\ldots,n\},\text{ and }\sigma \text{ known}\\ ~\theta_i|\eta_...
Is there any underlying assumption when we can reliably use Cohen's D? Do we assume our samples should be Gaussian? I know that Cohen's D is heavily biased by outliers and sample size. But is there any assumption on which it works?
I wish to display the (un)reliability in ranking of variables in an omics dataset in the classification of disease vs healthy. In this case it’s mostly of academic interest, as many use rank-based univariable screening to identify the (apparent) “best” markers in e.g. prognostic biomarker studies. I wish to show, in my...
I am currently working on an empirical design that, at first sight, reminds me of a classical difference-in-difference (DiD) setup. Let me give you an (imaginary) example: Assume we are observing bank loans that were originated between 2010 and 2015 and how they are traded (priced) on the secondary market, meaning that...
Question: Are there (known) variance stabilizing transformations for logistic regression? Backgound: As an M-estimator, logistic regression is asymptotically normal, under suitable regularity conditions. The asymptotic variance, however, depends on the unknown parameter $\theta^*$. Say, $$ \sqrt{n}\left(\hat{\theta}_n-...
I'm doing a design of experiments unit. I came up with prediction equations that predict the speed of a robot completing tracks of different types. The prediction equations give the settings for the best speed of the robot (m/s) for any particular track. The equations give a prediction for the average and the variance,...
i'm still confused about scoring parameter in randomized search First i want to know if my machine learning model is overfit or not. I use roc auc score between train and test.. turns out there is large gap between roc auc score between train and test. So i decided to do hyperparameter tuning. For information this case...
Suppose $Y,X$ are two continuous random variables, with supports $\mathcal{Y}$ and $\mathcal{X}$ respectively. Let $f_Y$ be the pdf of $Y$ and $f_{Y|X}$ be the pdf of $Y$ given $X$. We know that, for each $y\in \mathcal{Y}$, $$ f_Y(y)=\int_{\mathcal{X}} \underbrace{f_{Y|X}(y|t) f_X(t)}_{\text{joint pdf of $Y,X$}} dt $$...
I'm trying to find ways to do survival analysis on data with asynchronous interval-censored outcomes and time-varying covariates. I know that GLM binomial with a complementary log-log link function can be used in the analysis of synchronous interval-censored cases ref. On the other hand, GLM Poisson can be used to appr...
I have a question on how to derive the (marginal) pdf for the $k$-th random variable $X_k$, where $X_k = \cos(0.2\pi k + \theta)$, and $\theta$ is a random variable uniformly distributed over the interval $[0, 2\pi)$. Could anyone show me how to derive this?
I fitted a logistic regression model with a binary exposure variable X, trying to understand the effect it has on a given outcome Y, which measures infection (yes/no). I calculated the odds ratio of the variable of interest as well as the Average Marginal Effect, both highly significant. Particularly, in my case the AM...
I am curious as to how do find the likelihood function for the exponential distribution with parameters such as this: $$X \sim \exp(\beta- \mu) $$ With the following assumptions, $\beta$ is known $\mu< \beta$ We have an access to an i.i.d. sample $X = X_1, \dots, X_N$ of size $N$ Do we just substitute $(\beta-\mu)$ i...
I conducted a multilevel binomial regression (glmer) and I obtain quite wide confidence intervals for my odds ratio. What could be causing such large 95% CI and what can be done to provide more precise CI? Is it right to assume that odds ratio can be interpreted in the same way for a multilevel logistic regression as f...
Is it possible, through the output of the following code, to state that these two variables have a non-linear relationship? I found this code on the internet along with a statement that there is no linear relationship between these two variables, but I can't understand how to interpret these values to reach the respect...
I have a small set ( $n \approx 200$ ) $(x,y)$ data points representing the find location of a person on a landscape. From this, I generate a $20\times 20$ histogram and fit the fairly basic model class GPModel(gpytorch.models.ExactGP): def __init__(self, train_x, train_y, likelihood): super(GPModelWithDeri...
I am running a Linear regression and had encountered a situation where if I divide the total timeseries of data into segments I see a $R^2$ of 60% to 80%. But when I stack this data segment into a single data set and perform the regression the $R^2$ drop to just 10%. In other words if we consider 10 years of data and I...
I'm running a conditional logistic regression to assess habitat selection in coyotes. The conditional logistic regression essentially compares the environmental covariates of used locations (1's) to semirandomly generated "available" locations (0's) which are matched in strata to determine if certain covariates are mor...
Say I have an independent variable (x) and a dependent variable (y) for which I modeled the relationship using a simple linear regression (ols). I then use this model to predict on new x-inputs (out of sample data). How would I get the percent uncertainty (error) for each prediction on new x inputs? Example python code...
Given, we do not know if X,Y,Z are independent or not. Will the expression E[E[X|Z]|Y] = E[X|Z] hold true? What I have tried: Now, E[X|Z] is a random variable so let E[X|Z] be A So, problem boils down to E[A|Y] which can only be equal to E[A] if A and Y are independent. I would like to know if my thought process is acc...
Suppose I have a set $X$ with partition $X_1, \ldots, X_k$. Suppose $Z_i = (z_{i1}, \ldots, z_{iN/k})$ is a random sample of $N/k$ elements from $X_i$ and $Z$ is a random sample of $N$ elements from $X$. Can I treat "union" $\cup_i Z_i := (z_{11}, \ldots, z_{1N/k}, \ldots, z_{k1}, \ldots, z_{kN/k})$ of random samples f...
I believe this is very similar to the proof of the Gauss-Markov theorem. Suppose $E[\textbf{Y}|\textbf{X}] = \textbf{X} \boldsymbol\beta$ and $var(\textbf{Y}|\textbf{X}) = \sigma^2\textbf{I}_n$. How can I show that $\textbf{a}^T\textbf{Y}$ is BLUE(best linear unbiased estimator) of $E(\textbf{a}^T\textbf{Y}|\textbf{X})...
I am studying normal linear regression and wanted to ask a question about its utility when working with independent RV. Suppose that we have for $k \in [1,\dots,n]$, $$Y_k = \beta_0 + \beta_1x_{k1} + \beta_2x_{k2} + \dots + \beta_qx_{kq} + \epsilon_k \quad \text{where } \epsilon_k \sim_{ind} N(0,\sigma^2)$$ We can writ...
$$\bf{y}=\bf{X\beta}+\bf{\epsilon}$$ In asymptotic setting, assume: (a) linearity (b) $\{y_i,\bf{x}_i\}$ ergodic stationarity (c) weak exogeneity $E(\bf{x}_i\epsilon_i)=0$ (d) Rank condition $E(\bf{x}_i\bf{x}_i^{'})$ is nonsingular (1) assume (e) asymptotic normality of $\sqrt{n}\overline{\bf g}_n:\sqrt{n}\overline{\bf...
Normalizing data is helpful in most MCMC cases. Most of the times the suggested normalization is z-score. But what happens when I want to normalize data, which then I sample from a non-negative distribution ? E.g. let's say I model x = [263.1, 348.4, 362.0, 395.7, 479.2, 974.4] to come from an Exponential distribution:...
When it comes to threshold linear regression, in order to estimate it can we simply divide our dataset according to the threshold rule into 2 datasets and then simply estimate 2 equations with OLS? Or am I missing something important?
Short Background on Permutation Testing Suppose I have two sets of samples $P$ and $Q$ drawn iid from distributions $\mathcal{P}$ and $\mathcal{Q}$ over $X$. I also have access to a test function $T: X^n\times X^n\to \mathbb{R}$ that can take two sets of samples of size $n$ and output a real number. Say we have designe...
The input are a timeseries of 1x41x41 geospatial images (so, 5x1x41x41 for example). I managed to achieve an MSE of 0.53 with PCA and Random Forest. But I thought to use ConvLSTM since my input size is large and knowing that I can manipulate many variables to prevent overfitting.But as you can see from the image below,...
When we use anova() function to compare two or more models, what test is it actually performing? I don't think that's an "Anova" per si, right. Would it be a "a likelihood-ratio chi-squared test"* or anything else? Example: > mod1 <- lmer(Y ~ X1 * X2 + (1|ID), data = data, REML = F) > mod2 <- lmer(Y ~ X1 + X2 + (1|ID),...
I am quite new to causal impact. I have been using the python package 'causalimpact' since I read good feedback online and decided to give it a go. For context I am trying to check the impact of a marketing campaign, that happened multiple times throughout a given day (starting at 5.44 PM), on the visits. I am using tw...
Question 1: I'm wondering to what extent the repeated measures Anova extends the paired t-test? I came across this definition today. That being true, then, question 2: in a two-way 2x2 Anova, if the differences of scores is normally distributed, then there's no need for the variables be normally distributed? (such as...
Most standard IV framework looks at cases when both treatment (let's denote by $D$) and instrument (let's denote by $Z$) is binary. Let $Y(D)$ be the potential outcome (by using this notation, I'm implicitly assuming exclusion restriction). In this case, we have the following assumptions: Exogeneity: $Y(1), Y(0), D(1)...
I was going through the learn2learn library for meta-learning and saw this: classes = list(range(1623)) random.shuffle(classes) # todo: wish I wouldn't have copied l2l here and removed this...idk if shuffling this does anything interesting. Doubt it. train_dataset: FilteredMetaDataset = ...
By definition \begin{align*} \Sigma = F(\min(x_i,x_j))-F(x_i)F(x_j)\end{align*} Note: $\hat{F}_n(x) = \frac{1}{n} \sum_{j=1}^n 1_{\{X_j \leq x\}}$ I think that $\mathbb{E}\left[\hat{F}_n(x_i)\right] = F(x_i)$. Now considering \begin{align*}var\left(\hat{F}_n(x_i)\right) = \frac{1}{n^2} var\left(\sum_{u=1}^n 1_{\{X_u \...
Let $z_i$ be $i.i.d$ random variable with $E(z_i)=0$ and $E(Z_i^2)=1$ with a symmetric distribution. Further, $|\beta|<1$. Now consider $\sum\limits_{i=1}^{\infty} \beta^i (z_i+|z_i|)$. I want to prove this summation converges almost surely ($a.s$). End goal is finding $E(exp(\sum\limits_{i=1}^{\infty} \beta^i (z_i+|z_...
I am an MBA Student taking courses in Statistics. In our courses, we are learning about Regression Models and how to interpret the meaning of the parameters/coefficients in a Regression Model. For example, when studying "vanilla" Regression Models (i.e. Simple Linear Regression/ Multiple Linear Regression), we are told...
I have a population of National Teams (32), and parameter (mean) that I want to measure for each team, aggregated per match. For example: I get the mean scouts for all strikers for each team, per match, and then I get the the mean (or median) for all team matches. Now, one group of teams have played 18 matches and ano...
I wish to estimate the size parameter of the negative binomial distribution in R. Ideally I would like to estimate the size parameter when all I have are n = numbers of samples, m = mean count per sample, and n*m = total counts. I started out with the binomial distribution and estimated the binomial probability sever...
I am running a regression model where participants rate how they feel at 2 timepoints. Each participant rates how they feel at time 1 and time 2 (within subjects design) The following model returned an error (see error below): lmer(feeling ~ timepoint + (1 + timepoint|sub_id), data = d) Error: number of observations (=...
I am learning ROC about multiclass problem. I read this article https://towardsdatascience.com/multiclass-classification-evaluation-with-roc-curves-and-roc-auc-294fd4617e3a . I am confused about ovo problem. Is “Class1 vs Class2” is different than “Class2 vs Class1”? I read other paper saying that n classes will only p...
I have a small question about the derivation in the InfoNCE paper and it is killing me. In appendix A.1, it is estimating the mutual information with InfoNCE as follows: $$ \begin{align} \mathcal{L}_{N}^{opt}&=-\mathbb{E}_{X}log[ \frac{ \frac{ p(x_{t+k}|c_{t}) }{p(x_{t+k})} }{ \frac{ p(x_{t+k}|c_{t}) }{p(x_{t+k})}+\sum...
I am an MBA student taking courses in Statistics. I attended a seminar hosted by the Statistics faculty in my university in which students present the research they are doing. The students had data (e.g. age, gender, race, number of children they have, which university they studied at, what they studied in university, ...
I am an MBA Student taking courses in statistics. I was doing some reading online and came across Carstensen (2020), which I unfortunately do not have access to. This article suggests that "categorizing quantitative variable" is bad - but I am not sure why this is. Our professor in our statistics courses showed us exa...
I'm reading through Student's "The Probable Error of a Mean" from 1908 and I'm not sure what notation he is using. He says that if $s$ is the standard deviation from a sample $x_1 x_2 \ldots x_n$ then $s^2 = \frac{S(x_1^2)}{n}-\left( \frac{S(x_1)}{n} \right)^2 = \frac{S(x_1^2)}{n} - \frac{S(x_1^2)}{n^2} - \frac{2S(x_1x...
I'm using glmmTMB model with mixed effects and beta distribution and I'm wondering is there a way to count degrees of freedom of my model variables (they are not in my model output)?
Context In the price elasticity of demand modeling field. I have some data to use, which the basic is average weekly price and volume of a product. As you can see in the image, each point represents the weekly value of transactions. The goal is to weight values in order to give importance to more recent value. Accordi...
A box contains two coins: a regular coin and a biased coin with $P(H)=\frac23$. I choose a coin at random and toss it once. I define the random variable X as a Bernoulli random variable associated with this coin toss, i.e., X=1 if the result of the coin toss is heads and X=0 otherwise. Then I take the remaining coin in...
New to Bayesian Modeling and the python library PYMC. Got some confusing result. How would an expert on Bayesian modeling interpret these graphs? with BVAR_model: trace = pm.sample(chains=4, random_seed=rng) az.plot_trace(trace) After changing the number of lags, from 2 to 4, and applied differencing I got the f...
So, the data is comparable to height of individuals within Africa and Europe, but each group (Europe, Africa) have multiple replicates (3 x month sampled). Each replicate is ~100,000 individuals. A standard method would be to take the mean from each replicate and use those to compare the two groups, however this reduce...
As an input I have the mean (expected value) of a probability and the 95% upper bound. Now, I would like to define the α and β parameters for a Beta distribution such that I can do Monte Carlo simulations. I know the expressions for these parameters in terms of E[X] and Var[X], but do not have Var[X] directly available...
There are two random variables $X,Y$ with deterministic non-linear surjective and non-injective relationship $y=f(x)$ and I know unnormalized pdf $\hat{p}_y(y)$. I want to obtain samples $y \sim p(y)$, but I want to perform sampling in the space of $X$. The theory says that I have to use variable transformation $p(y)dy...
I have a small kernel svm code. from sklearn import datasets from sklearn.svm import SVC import numpy as np # Load the IRIS dataset for demonstration iris = datasets.load_iris() X = iris.data y = iris.target # Train-test split X_train, y_train = X[:140], y[:140] X_test, y_test = X[140:], y[140:] print(X.shape, X_t...
This question relates to bounds on expectations of order statistics, elaborated upon in the Book by Arnold and Balakrishnan (1989). Let $X_1,\ldots,X_n$ be i.i.d. continuous random variables distributed on a positive and finite interval $[0,a]: a \in \mathbb{R}_+$. Denote by $\mu_i=E[X_i]$ and $\sigma_i^2=var(X_i)$. Le...
I am plotting the precision-recall curves for my models which I have built using an imbalanced dataset. I initially plotted the precision-recall curve for my models using the plot_precision_recall_curve function directly, like so: # split into train/test sets trainX, testX, trainy, testy = train_test_split(X, y, test_s...
I'm wondering about the difference between MTBF and lifetime (I've to admit I'm not sure whether the last link is too specific..). source source To make it precise: Let's say there is a single mechanical item, what would MTBF and lifetime tell about it?
This is a pretty elementary question, but I can't find an answer to it! Assuming I have a lognormal distribution represented by $\log(X)\sim N(\mu,\sigma^2)$. How do I interpret the likelihood of an event occurring in $X$ based on the $\sigma$ of $\log(X)?$ Would it be correct to state : that $68\%$ of the observatio...
I have around 20 Million time series(say of product demands or merchant's activity for a few past years). I am looking to develop: An automated way to classify these time series as being regular or seasonal(Seasonal here means there is peak activity in some part of the year say every April or even April-May-Jun). For...
In the clinical trial design, we often make assumptions about clinical endpoints. For example, we may assume the blood pressure followed a normal distribution, such as $ X \sim N(\theta, \sigma^2)$, $X \in (-\infty, +\infty)$. From the perspective of clinical practice, a negative value of blood pressure is impossible o...
What's the best way to find an estimate of weather factors' thresholds/lower/upper limits for a response variable (in my case disease severity) in studies conducted under field conditions? I have managed to find out that disease severity increases with increasing rain & relative humidity & temperature but I'm struggli...
I have data about storage consumption for a lot of users (N > 50k+). The raw data distribution would look something like this: Given the outliers, to get an estimate of how much storage each user consumes I'd like to build a confidence interval for the median memory consumption (I guess I could build it for the mean i...
I have a dataset for 100 households and 10 years. I created a new variable called x1hat conditional on the household identifier. Then, I assigned the same value as under variable x1 to all households from 1 to 60. All other households should have a x1hat which equals x1 + 100. I've tried the following code in r: #crea...
I am running a logistic regression using a set of several predictors as well as several interaction terms. For each predictor, I am running a Wald test in statsmodels to test whether or not a predictor is significant in my model. I am doing this by testing the joint hypothesis that all terms involving the predictor (in...