instruction stringlengths 9 38.7k |
|---|
I have a large list of $n$ distinct numbers drawn from a discrete uniform distribution of integers in $[0, M[$, with $n \ll M$. $M$ is known, but $n$ isn't. It's too expensive to read all $n$ numbers, but I can read the $k$ smallest numbers in the list for some $k \ll n$. I want to estimate $n$ from this sample.
Let's ... |
I've been trying to understand very hard this exercise, but I haven't been able to understand how it's solved. The topic is Bayes's theorem. This is the same exercise stated here but that question doesn't have an answer and I went a bit forward. The exercise says:
A woman lives in a country where only 1 out of 1000 pe... |
Mean = u = 10 std = o = 2
Finding a and b such that P(a<x<b) = 0.90 and |u-a| = |u-b|
So I looked at a Z table and found 0.90 sitting between a Z-Score of 1.28 and 1.29. I added those values up and took the average so that.
1.28 = 0.899727432 and 1.29 = 0.901474671
(0.899727432 + 0.901474671) / 2 = 0.9006010515
Z= 1.28... |
Suppose $X \sim N(0, \sigma^2)$, is it possible to evaluate $E[\Phi(\frac{aX + b}{c}) | X > k]$ in closed form, where $\Phi$ is the standard normal cdf?
The motivation comes from that it is possible to evaluate something like $E[\Phi(\frac{aX + b}{c})]$ with a closed-form expression. But not sure if something similar h... |
Using rjags and jags.samples (), I have multiple parameters that are monitored and some parameters are in matrices. This means for example, with 2 chains and 5000 iterations, jags.samples() may return a list of mcarrays, say, "samp":
par1 has dimension [1:2,1:2,1:5000,1:2]
par2 has dimension [1:2,1:10,1:5000,1:2]
par3 ... |
I use the Poisson distribution in virology where we try to answer: "What is the probability that X viruses enter a cell given a E(x)=MOI (=virus/cell)".
The analogy is that we throw a certain amount of balls on buckets and we ask how many balls enter in each bucket. If I understand everything correctly this is a case o... |
I'm studying and implementing a variational auto encoders to perform unsupervised clustering. I understand that them use a probabilistic approach respect to a traditional neural network, but I don't understand which are their advantage respect to the traditional ones. Thanks for your answer
|
I'm experimenting with the marginaleffects package trying to calculate counterfactual marginal effects for the species variable. I'm just wondering if someone could help to show me what I'm doing wrong in the code as only two of the three pairwise comparisons are shown.
Thanks.
library(marginaleffects)
dat_pen <- read.... |
In the OLS, we can run t-tests on the coefficients obtained from linear regression, but how can we test on the coefficients we obtained in the case of lasso or ridge? What's the common practice in data analysis
|
I runned two GLMs using the same dependent and independent variables, but modelling each analysis according a different type of distribution. Then, I compared its AIC values to find what distribution best fits the data:
> glm_1 <- glm(data$Y ~ data$X, family = "gaussian")
> glm_2 <- glm(data$Y ~ data$X, family = "Gamm... |
I recently failed to solve a problem relating to conditional expectation. The problem states:
A student is initially outside. He is given the choice with a probability of 0.4 of going to the playground, 0.3 of shopping in the mall and 0.3 of returning home. If he is in the playground, he takes 2 hrs of time and then d... |
The actual values of NMDS axes are essentially arbitrary, as I understand them - there's no meaning to be gained from a value of 1 or 100 or 10,000. In keeping with good design principles should I drop the axis text and background grid and just include the zero-lines for each axis? Or is there something I'm missing tha... |
Let N be the number of phone calls made by the customers of a phone company in a given hour. Suppose $N\sim Poisson(\beta)$, where $\beta > 0$ is known.
Let $X_i$ be the length of the i'th phone call, for i = 1,2, . . . ,N. We assume $X_i$'s are independent of each other and also independent of N. We further assume $$X... |
If we do linear regression we have the following decomposition of the sum of square. I call $y_i,x_i,\hat{y}_i$ the observed variables, the predictors and the linear predictions respectively. Then the residuals are $e_i=y_i-\hat{y}_i$. We also indicate with on overline the mean over all samples. Than:
$$\sum_i (y_i-\ov... |
I am following this https://www.coursera.org/learn/survival-analysis-r-public-health/lecture/s4N9p/how-to-run-simple-cox-model-in-r and I've found that the coxph command ( survival package) perform a likelihood ratio test after the application of one and one only cox model:
Correct me if I am wrong but, as far as I kn... |
If you allow a bit digression about the context: I am on a journey to better understand the power and usefulness of parametric distributions; I am a bit scared of them. Maybe due to the fact that I've entered the world of data analysis more from the side of "data science" & ML rather than from the side of pure statisti... |
I observe some individuals (labeled id) that have made a choice from a set (the alternative variable is alt). The choice set remains constant, but choices are made at different periods (year). Also, all individuals from the sample are unique (i.e. I do not observe individuals making choices at different periods). Here'... |
I'm not an expert on this methods, and maybe my approach have some error. But I wanted to know how to compute a Least Square estimators given samples with different dimensions.
For example you have a sample $B:\{b_1\dots b_N\}$, and also a sample $C=\{c_1\dots c_M\}$ where $N\neq M$, and you also know the relation betw... |
A book reports that ICA cannot be used if the independent components of the analyzed data are Gaussian (at most one can be Gaussian, but no other). However, in the same book, the following example is reported:
"A number of 1024 samples of a two-dimensional normal distribution was generated with mean μ and covariance ma... |
I'm stuck trying to understand the relationship between normality and autoregressive models. If we have a variable Y(t) given by an AR(1) model with zero mean for the marginal distribution, how do we actually check for normality for the conditional and marginal distributions given that the Y(t) is stationary? Some ques... |
Suppose $X$ is a random variable that is bounded with high probability, i.e., $|X| < M$ for some $M \in \mathbb{R}^+$ with probability $1-p$. Is it correct to say that $\mathbb{E}(|X|)<M$ with probability $1 - p$ as well?
|
I'm working on a project where the objective is to determine whether there are factors that distinguish an emergency department (ED) encounter from a high-frequency patient (8 or more encounters per year) from all other encounters. My data is at the ED encounter level and contains data that is both specific to the enc... |
When working with normal distributions, please could someone help me understand why the two following manipulations have different results? Is $X + X$ different from $2X$?
Take $X$ to be normally distributed with mean and variance $X\sim N(2, 3).$
$Z = X + X$ is also normal, i.e. $Z\sim N(4, 6)$.
$Q = 2X$ is also norma... |
I have data on 150 sprint races $r$ and on the rankings and training routines of 20 athletes $i$ who have participated in each race.
I am interested in finding out whether spending more time training is associated with an increased probability of winning a given race. I am thinking of approaching this with the followin... |
(I am not sure if this is the right community to ask this question or whether math.stackexchange would be more appropriate. I feel this is the right one but let me know if I should cross-post)
I'd like to (probabilistically) map barometer data to altitudes. In other words, for a given value of barometric pressure I'd l... |
after reading this paper https://onlinelibrary.wiley.com/doi/10.1111/1440-1681.12052 I have real troubles deciding which test is most suitable for my analysis.
The data is following: a group of patients with a phenotype was selected for a study to investigate the occurrence of certain feature X. The outcome of the stud... |
I'm training an sklearn decision tree in python, and it has achieved around 99% accuracy on cross validated test data, so I would like to know what exactly the tree is doing in order for it to predict the test data so accurately.
I know I can plot feature importance and look at SHAP values, but I'm wondering whether th... |
Are these models considered linear models?
I was reading an article that stated that GARCH(1,1) is superior to non-linear GARCH Models.
Source: https://www.researchgate.net/publication/346647974_Comparison_of_linear_and_non-linear_GARCH_models_for_forecasting_volatility_of_select_emerging_countries
This means that a GA... |
I'm struggling to create a forest plot that separates the average effects by outcome. I ran a multivariate mixed effects meta-analysis with 6 outcomes, with 49 studies (some studies have effect sizes for all six outcomes; others have less). Here is the model and output:
main_model <- rma.mv(ES, variance, mods = ~ RELAT... |
Suppose we are given that $X_1$ and $X_2$ are two non-negative random variable such that $$X_1+X_2\sim\chi^2_{(2)}$$. Also we are given that $X_1\sim\chi^2_{(1)}$. Can we say the following
$X_2$ is independent of $X_1$?
$X_2\sim\chi^2_{(1)}$?
If not, then please provide a counterexample.
This is just a fun question q... |
I have $n$ IID samples $X_i$ from some distribution. I can calculate $\min_{i \neq j}(|X_i - X_j|)$ and would like to get a confidence interval for said quantity.
Naive Bootstrap clearly makes no sense here. Let
$$
X^{\star}_1,\dots, X^{\star}_n
$$
a bootsrapped sample. Then, with high probability, there exist $k\neq l... |
I have given data for users which is right skewed with a long tail, meaning high gmv is driven by few users. Now I have 2 cohorts of users for whom I want to compare gmv distribution. My first instinct was to go for t-test but it has an assumption of normality. Though I also found I my readings that if my sample size... |
Problem.
Eggs are thought to be infected with the bacterium salmonella enteritidis so that the number of organisms, $Y$, in each has a Poisson distribution with mean $\mu$. The value of $Y$ cannot be observed directly, but after a period it becomes certain whether the egg is infected ($Y > 0$) or not ($Y = 0$). Out of ... |
If we have a set of observations $\mathcal{D} = \{x_i\}_{i=1}^n$ then the likelihood $\mathcal{L}$ is:
$$ \mathcal{L}(\theta \mid \mathcal{D}) = P_\theta(\mathcal{D})$$ and if the observations are independent then:
$$\mathcal{L}(\theta \mid \mathcal{D}) = \prod_{i=1}^{n}P_\theta(x_i)$$
where $P$ is the probability mass... |
I've recently learned about Gaussian mixture models (GMM) in school. The formula for a GMM goes something like this:
$$p(x) = \sum_{k=1}^{K} \pi_i\mathcal{N}(x|\mu_i,\,\sigma^{2}_i)$$
Now, I know from probability theory that given a certain sample $x$, the probability for it should sum to 1.
For example, if I roll a si... |
Why do we need to estimate the variance of $\hat{\beta}_1|x_1, x_2,\ldots, x_n$ when we want to test a hypothesis about $\beta_1$?
|
I want one expression for the null hypothesis for the location tests (one-sample t-test and one-sample Wilcoxon test)
can I write this for both tests
$H_0:\mu=0$ as general expression?
|
Is there a way to obtain averaged marginal predictions (predict then average like the margins command in Stata, not average then predict like emmeans in R) using the marginaleffects package?
I am looking for a package in R that does most (preferably all that margins does in Stata) in terms of not only calculating estim... |
To explain clearly what my question is imagine this simple example.
"There are 101 boxes each numbered 1,2,3... and so on. An android can randomly choose one of these boxes, but each one with a probability proportional to its number."
import numpy as np
from empiricaldist import Pmf, Cdf
NB: The function Pmf() from e... |
I have two measurements $X = x \pm \sigma_{x}$ , $Y= y \pm \sigma_{y}$, where $x,y$ are the mean values of $X$ and $Y$ and $\sigma_{x},\sigma_{y}$ are their corresponding uncertainties. The covariance matrix ($\Sigma$) for them is the following:
\begin{equation}
\Sigma = \begin{pmatrix}
\sigma_{x}^{2} & \sigma_{xy}\\
... |
When I do ML estimation, I always get confused about whether I should $\max_\theta\prod P(D | \theta)$ or $\max_\theta\prod P(\theta | D)$, where $D=\{x_1,x_2,\dots,x_N\}$ and $\theta$ are the parameters of the distribution. I know that in the first case, what I am doing is maximizing the likelihood, and in the latter ... |
My goal is to learn hypothesis testing one sample one sided. Honestly, I don't get it.
Hypothesis testing one sample RIGHT SIDED
H0: μ <= x̄
H1: μ > x̄
For example, I have a pg_df = pd.DataFrame([10,9,9,10,11,9,8])
The pg_df.mean() is 9.4
Questions:
Google have been saying μ is mean population. But why do we compare ... |
I'm carrying out a GLM on proportion data (derived from counts)
After carrying out a GLM with the quasibinomial error distribution (my data is non-integer)
model=glm(response~predictor1+predictor2, data=df, family=quasibinomial(link=logit)
After which I get a summary which shows that the data is not overdispersed
I was... |
I am an MBA Student taking courses in statistics.
In this last week, I have heard two conflicting opinions from my professors on Statistics.
1) Predictive Models can NOT make predictions on individuals - only on groups: My professor from my "Research Methods" class introduced us to the concept of the "Ecological Falla... |
I have created 2 scripts for training a simple classification decision tree with cross-validation.
The problem is that sklearn is performing better in time and accuracy than a spark.
I have the exact same configuration so I don't really get how Spark gets 0.43 acc but sklearn gets 0.89 acc.
Also, I have 4 nodes, 16Go R... |
I need to investigate a chain of influences which can be described as following: First, a deliverer sends barrels of oil. These will be connected to a certain system and purified. Next, the oil will be pumped through a main line throughout the company with several valves. From these, mechanics can fill up oil according... |
My colleagus has asked me to read through the ETOS material for estimating confidence intervals (published by Statistics Sweden) and point estimates, knowing I have a bachelor's degree in statistics. I know a bit about estimation but the terminology is partly new to me.
How do I interpret the different parts of this cu... |
Situation:
My objective is to apply Machine Learning (for regression problems). Therefore, I have a panel dataset of time series with daily fund data from 2018-01-01 to 2020-12-31. My target is fund flow. To apply ML models, I wanted to split my dataset into train and test set, using 2018-01-01 to 2019-12-31 for traini... |
I work in the field of linguistics, and my current project involves lots of distance matrices generated from language data, which measure the distance and similarity of dialects. Concretely, my distance matrices range between 0 and 1, where 0 represents no distance and 1 represents maximal distance between dialects. No... |
I am working on time series data where I am using FB Prophet algorithm. I am willing to build a dashboard to produce validation results to my clients. What could be a possible model validation strategy, keeping in mind that I want to present the status of the model in the form of a Red-Amber-Green (RAG) status.
|
Hi I have a dataset including 885 observations. We are looking at the association between a set of predictors and the chance of pregnancy after embryo transfer. The response variable is dichotomous (pregnant or nonpregnant). Predictors are dichotomous (number of embryos; 1 or 2, time; before a certain date and after, e... |
Warning: I am not a statistician, so please go easy!
I have a (not) normally distributed measure of a population, with possible values from 0 to 100%. Its mean is 60%.
I need to be able to shift the distribution to give it a mean of 70%.
I obviously can't just add 10% to all scores because anyone who previously scored ... |
I am trying to wrap my mind around causal inference, mostly because I think it will be useful for my work. I read the Book of Why, I read "Causal inference in statistics: A primer", I did an online course on that. As far as the maths in the primer goes, I can follow it without a great effort (but maybe I am fooling mys... |
I need to compute an effective diameter is 90-th percentile of the distribution of shortest path lengths of a graph.
My attempt is:
library(igraph)
set.seed(4)
g <- erdos.renyi.game(n=50, p.or.m=100, type="gnm", directed=TRUE, loops=FALSE)
sp <- as.vector(shortest.paths(g, algorithm = "dijkstra", mode="out"))
sp <- sp[... |
It's my understanding that if I center $y$, the intercept should be 0. However, when using glmnet, I get a non-zero intercept doing this:
lasso_model = glmnet(x=bodyfat$x,y=bodyfat$y-mean(bodyfat$y),intercept=TRUE,alpha = 1,lambda = 1.5)
The intercept is given as $-45.53019$, but shouldn't it be 0 because I've taken t... |
I am working on time series with seasonality. However, the event that is repeated every year doesn't happen exactly in the same time, it advances by specific period of time. (example an event happened this year on 1st January, next year will take place on 11th January and the year after that 21st January and so on. eac... |
I have some data of pairwise comparisons between players with a continuous value as outcome, for instance like this:
Player1 Player2 Score
---------------------
A B 12.38
A C 4.82
C B 6.41
C D 1.39
A D -1.05
... ... ...
Where a positive score me... |
In a famous book whose authors do not want the solutions of the exercises published on the web, one can find the following exercise.
Let $(X^i)_{i \in \{1,\cdots,n\}}$ be i.i.d gaussian vectors of law $\mathcal{N}(0,I_d)$, that is, each $X^i$ is a vector in $\mathbb{R}^d$, and each of its coordinates is a gaussian vari... |
I'm running an imputation using the mice package in R (imputing 7 variables with missing values on the basis of 10 total variables). The imputation runs fine, and the imputed variables look reasonable in terms of the spread and gaps compared to the original distributions.
Looking at the plot of the various imputation c... |
We know, roughly speaking, the algorithm of decision tree is like an approximation with piecewise constants.
For example, suppose we have a function $f$ from $[0,1]$ to $\mathbb R$. Then we can use decision tree to approximate it, i.e. using piecewise constant functions to approximate it. The trained model can tell us ... |
I have a multivariate normal distribution for vector $\mathbf{x}$ with mean vector $\boldsymbol{\mu}$ and covariance matrix $\boldsymbol{\Sigma}$. In my specific use-case, $\boldsymbol{\Sigma}$ is actually a correlation matrix. For the sake of calculating some leave-one-out log-likelihood values downstream, I need to e... |
I'm evaluating a large data set in pandas (over 4 million rows), and finding that the median values for a couple of my datapoints are completely unchanged over a period of three months.
For example, when looking at a set of miles per day and calculating medians per month I get this:
Median miles per day:
January: 0.916... |
I am building an indicator for developable land as the inverse of the principal component of four variables that are all negatively correlated with land availability (e.g. terrain slope, fraction of soil covered by water, etc.).
This is the output of my analysis
Principal components/correlation Number o... |
I have a doubt from a passage in the ensemble learning chapter of Aurelien Geron's book "hands on machine learning... ".
I do not understand
If you do the math, you will find that the probability of obtaining a
majority of heads after 1,000 tosses is close to 75%. The more you
toss the coin, the higher the probabilit... |
I want to evaluate the efficacy of an intervention that only about 50% of participants comply with. The intervention consists of giving people an app that they are asked to use over an extended period of time. The problem is that only about 50% of the participants who are asked to use the app do so consistently. We hav... |
To calculate the PDF of the sum of two triangularly distributed random variables all I did was add them together and divided by two:
$\dfrac{f(x, a1, b1, c1) + f(x, a2, b2, c2)}{2}$
And implementing it in Python gets me the following PDF:
My issue was with the CDF. Addition doesn't work, but I don't know how to mathe... |
Assuming I am conducting an AB testing on a website to see if there is an increase on user click thru rate. I know there are many different kinds of tests such as t-test, ANOVA, etc. Is it required for me to use these tests if my result is obvious that there is a substantial difference? In other words, when should I us... |
Let the random variable $X$ follow the distribution:
$$ f(x;\theta) = \theta^2(x+1)(1-\theta)^x$$
where $x$ takes values in $[0, \infty)$ and $\theta$ in $[0, 1]$. The likelihood is defined as:
$$\mathcal{L}(x \mid \theta) = p_\theta(x)$$
and for $N$ i.i.d observations:
$$\mathcal{L}(\theta) = \prod_{i=1}^N p_\theta(x_... |
Is this misusing correlation? Am I being silly?
maybe it would only be a correlation if there were multiple pictures of cats being on broken roofs
|
I am reading Robin's What If Causal Inference book Chapter 4 section 1. In the book, it says the following assertion where $V$ denotes subset of the groups. I could not figure out the reason why
"In the presence of qualitative effect modification, additive effect modification implies multiplicative effect modification,... |
The following is the Hessian matrix given to me from R's optim() function:
10230 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
How can I interpret this? Is the first parameter that optim() optimized the only parameter that we can make uncertainty quantification on? Are the last 3 parameters' optimized values not credible... |
I have been exposed to Canonical Correlation Analysis (CCA) a few years ago and I still find it mathematically elegant and beautiful. On Cross Validated there are several interesting posts on CCA, most of them with quite detailed answers. However, from a practical point of view, I still fail to find compelling applicat... |
Suppose that $X$ is a continuous random variable with PDF:
$$f_X(x)=\begin{cases}
4x^3 & 0<x\le 1\\
0 & otherwise
\end{cases}$$
and let $Y=\frac{1}{X}$. Find $f_Y(y).$
My approach:
First, find the CDF, $F_X(x)$:
$$F_X(x)=\begin{cases}
0, & x\le0\\
x^4, & 0<x\le 1\\
1 & x>1
\end{cases}
$$
Next, find range of $Y$, $Y\in... |
I have a data set with lots of small integer values and occasional large integers. For instance 1,1,1,3,2,1,320,2,3,4. I would like to scale my outlier values such that I can perform regression on my data. The conditions for rescaling are - I need only integer values and the transform must be reversible. ie if I scale ... |
$$ f(x) = \frac{\pi}{2b}\sin\left(\pi\frac{x-a}{b}\right),~~x\in[a,a+b]$$
So it's a pretty simple distribution, which is just a scaled sine wave. As an experiment, I was trying to find the MLE estimates of $a$ and $b$ but I can't find it for $b$ and the result for $a$ doesn't seem to work. Intuitively, you want to move... |
This is a negative binomial distribution. How would you solve this equation?
|
I have two processes, A and B. I have tested A and B separately on different tasks, and each performed at a 90% level on their tasks (say, text classification). Now, I pick a random set of 100 tasks to compare A and B, and on the random set, A did better on 60 of the tasks, and B did better on 40 of the tasks. But t... |
Suppose there is a regression with three variables $X_1, X_2, X_3$. Say $X_1$ and $X_2$ have near-multicollinearity, but $X_3$ is (nearly) orthogonal to both.
Will $\beta_3$ experience the same problems the other two coefficients?
|
Suppose I have two groups which are uniformly distributed random betwee 0 and 100. So combined score is 200.
I want to know the the number of observations and correlation which obtain a joint score of more than 100.
I have the following:
X = matrix(runif(n = 200, min = 0, max = 100), nrow = 100, ncol = 2)
Which gives ... |
Covariance
The covariance of two quantities $X$ and $Y$ within a population, $Cov(X,Y)$, is symmetric and bilinear. It is also true that $Cov(X,X) \ge 0$. So, clearly $Cov(X,Y)$ qualifies as an inner product, and it measures how much the two quantities vary with each other. My question is whether or not there is some c... |
I have to do a PCA in R for a project, but I have 300 data in 15 differents groups, and I want to find the reduced space which gives me the most variability between the groups and cluster my data in their own group ( so not between all the data) so I can do an analysis later while using these variables (I have 4000 ver... |
I realized in variational inference, our goal is to approximate $p(z|x)$ with $q(z)$. So we minimize $KL(q(z) || p(z|x)) = \mathbb{E}_{z \sim q} log\frac{q(z)}{p(z|x)}$. We then manipulate, through some simple steps, to arrive at:
$$ = \mathbb{E}_{z \sim q} \left[ log \frac{q(z)}{p(z,x)}\right] + logp(x)$$
and then the... |
I just want to confirm -
our review volume has an upward trend but no seasonality. I can use holt's exponential smoothing. Right?
for average ratings, no trend, and no seasonality. simple exponential smoothing?
Are there any other factors I should consider? Thank you!
|
How can I get predicted R-square along with R-square and Adj-Rsquare in statmodels?
code
import statsmodels.api as sm
import numpy as np
import pandas as pd
import statsmodels.formula.api as smf
from statsmodels.stats import anova
mtcars = sm.datasets.get_rdataset("mtcars", "datasets", cache=True).data
df = pd.DataFra... |
My goal is to learn hypothesis testing. My understanding is that we do not have the population data. Therefore, we do not know the estimated population mean. So, we guess the population mean. If that so, can we change the population mean until the p-value is below 0.05, so we have enough evidence to reject the null hyp... |
I have a model with one latent variable (two observed variables A and B). I think variable A is contributing to the majority of the entire model's significance, and variable B might contribute less or none. I wonder whether there is a way to compare statistically the contribution of observed variables A and B to this m... |
I am trying to apply Kaplan-Meier survival analysis from the Reliability package in Python to a problem with discrete time periods, and I'm having some trouble understanding which periods to list failures and right-censored data in.
My problem input is described (with made-up data) as follows:
I have 200 people in a tr... |
I am having confusion for percentage calculation for marks I have obtained in my exam.
I have 9 subjects with total 900 marks (100 marks each) and out of them I got 699.
Two more subjects with total 100 marks (50 marks each) and out of them I got 48 and 46 marks.
Now, how can I calculate the percentage I obtained for t... |
$y = f(x,...)$
$y$ represents the total effort in hours to complete a mix of tasks (each $x$ is a different mix) of varying complexity. It might be a non-linear relationship, but for now, I only have the count of tasks. No complexity data. I'd like to understand the correlation between total effort and task count.
A si... |
Consider this example. Suppose we have three events to happen with probability $p_1=p_2=\frac{1}{2}\sin ^2\theta ,p_3=\cos ^2\theta $ respectively. And we suppose the true value $\theta _0=\frac{\pi}{2}$. Now if we do $n$ times experiments, we will only see event 1 and event 2 happen. Hence the MLE should be
$$\mathrm{... |
I am analysing some data with glmer (lme4). This is what the data looks like:
Animal_ID Environment Sex Br_Status Group Day M_time
1 DamELC01 colony female nbr fnbr 1 26.1
2 DamELC01 colony female nbr fnbr 2 12.9
3 DamELC01 colony female nbr fnbr 3 8.3
4 DamELC01 ... |
From the same dataset and same ordinal regression model, I get two different intercept outputs with Python's statsmodels library (OrderedModel function) and with R's MASS package (polr function), and I don't understand why.
I don't know if the problem originates from a software issue or from a statistical issue/interpr... |
Q1) How to interpret the Seasonal Decompose (Additive V/S Multiplicative) plotted against the same dataset?
Q2) And, on the basis of the below plotted Observed data-points, which decomposition one makes more sense, and why?
Observations from Multiplicative Decomposition:
Seasonal & Trend chart scales between 0.99 to ... |
Motivation:
I have a 4x4 table of positive values (let's call it $A$) with the bottom right value missing ($A_{44}$ is not defined), and I think/assume the table is a ratio-table with just a little bit of noise.
My goal is to find the missing value.
Mathematical formulation:
The way I am seeing this problem is approxim... |
I am going to post it here, as suggested in stackoverflow:
I am analyzing percentage data with glmer, and I have read that Gamma family should be suitable for this kind of data. I have checked my data and there are no values below 0, but I still get an error saying I have non-positive values.
> summary(total_F$p.prcn... |
In a setting with a binary outcome logistic model focusing on a binary treatment, how would you translate the average marginal effects to make it understandable to a layperson?
Let’s suppose the treatment X has an AME of -0.025, meaning that the probability that y=1 decreases by 2.5% points when X=1.
Could we say the t... |
I have biomass data collected at 3 different distances from 42 different ant mounds (at the edge of the mound, 1m and 4m away). In total there's 42 ant mounds, from 11 plots at 5 different elevations (the samples is unevenly distributed by elevation, where the highest elevation only consist of 3 mounds and the lowest o... |
If my linear regression model provides good results on the test set, and my main goal is to predict correctly, is there still a reason to plot the residuals and check the residual assumptions? (for example, to check if they are independent)
Let's assume the regression model has good results for a relevant metric for my... |
I have a binary classification problem, where there are multiple correct predictions, however, I would consider the prediction to be correct if the highest confidence prediction of a 1 is correct.
I have had limited success with a CNN using the mean square error loss function. I think the reason is that, this loss func... |
Consider the below time series. I have marked a typical outlier (that needs to be removed) and a typical level shift (which is genuine data, not an outlier).
The above time series is easy to handle by simple "differencing" and dropping any two consecutive values if their sum is much smaller (say 1/10th) of the individ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.