<p>In the linked article the authors formalize microarray analysis as the study of the joint distributions of <span class="math-container">$\overrightarrow{X}_i$</span> and <span class="math-container">$Y_i$</span>, where <span class="math-container">$\overrightarrow{X}_i$</span> is a vector of random variables, the distribution of each of which (i.e. each of <span class="math-container">$X_{ji}$</span>) is determined by the level of expression of gene j in sample i, and <span class="math-container">$Y$</span> is some response or covariate of interest.</p>
<p>The response/covariate is the easiest to interpret in terms of biology. It is the condition. So it might be treated or untreated if we were interested in genes that respond to drug treatment, or it might be diseased vs healthy - this would be covariates. Or it might be &quot;time to death&quot;, &quot;body mass index&quot;, etc. - these would be responses. The difference between a co-variate and a response is which is the dependent and which is the independent variable. In differential expression we have &quot;gene expression ~  disease&quot; (i.e. X ~ covariate), where <code>~</code> is pronounced &quot;is predicted by&quot;. In the case of survival analysis &quot;time to death ~ gene expression&quot; (i.e. response ~ X).The malleability of the relationship between X and Y is what is meant by</p>
<blockquote>
<p>&quot;The population and sampling mechanism will depend on
the particular application&quot;</p>
</blockquote>
<p>A random variable is any variable that we cannot know the value of until it has been measured. Note, this is <em>not</em> &quot;do not&quot; know the value of, its &quot;can not&quot; know the value of.  So for example, in this case of RNA-seq, X is not the gene expression, it is the number of reads. An all-knowing daemon could know the gene expression for a gene in a sample before we measured it, but they couldn't know how many reads we will get because of the randomness introduced by sampling.</p>
<p>Random variables don't <em>represent</em> distributions, they <em>have</em> distributions. That is, if you were to realize many trials of a random variable, the values you obtained would form a distribution.</p>
<p>So the number of reads you get mapping to a particular gene in a sequencing experiment is a random variable. As is the brightness of a spot on a microarray. Its an interesting question to ask if <span class="math-container">$Y$</span> is a random variable. The answer is &quot;it depends&quot; - and what it depends on is how good we are at controlling an expriment. You might argue that &quot;drug treatment&quot; is not a random variable because we treat the cells or not - we know, but that, say &quot;time to death&quot; or even &quot;age&quot; is a random variable, because we don't determine it ahead of the experiment. Either way, this subtlety is covered by the above quoted sentence.</p>
<p>So, in a traditional bulk sequencing experiment we have a matrix of random variables associated with gene expression <span class="math-container">$X_{ji}$</span> - the number of reads for gene j in sample i, and <span class="math-container">$Y_i$</span> the condition for sample i. Note that <span class="math-container">$Y$</span> is indexed by the sample, not the gene - every gene in the sample uses the same value of <span class="math-container">$Y$</span>. And for each gene j we test the model <code>X_i ~ Y_i</code> - the expression in sample i is predicted by the condition of sample i.</p>
<p>In a single cell sequencing our matrix of random variables associated with gene expression is actaully a tensor, that is, it has three indexes, not two: <span class="math-container">$X_{jki}$</span> - that is the number of reads from gene j in cell k in sample i. In a scarily large number of single cell sequencing experiments, i only has one value (i.e. there is only one sample). And in most single cell experiments I've seen <span class="math-container">$Y_i$</span> only takes one value, even if there are multiple samples. Even if <span class="math-container">$Y$</span> takes multiple values, its not clear what sort of model you'd fit to the structure <code>X_{ki} ~ Y_i</code> - i.e predicting a matrix of many cells by a single vector of covariate values.</p>
<p>I think one analysis you can do with Seurat is to treat each cell as a separate sample, and each cluster as a condition, and thus try to find gene DE between cell types. I'm not convinced how great this sort of analysis, but here, the i in <span class="math-container">$X_{ji}$</span> would represent which cell a measurement was from and <span class="math-container">$Y_{i}$</span> would represent which cluster. But this sort of analysis seems prone to all sorts of date-peeking and training set leakage problems.</p>
<blockquote>
<p>if we suppose that Xg and Xr denote the random variables that associate to the expression level of the gene g and of the gene r, respectively. Let Y and Yv represent the responses for Xg and Xr, respectively.</p>
</blockquote>
<p>First, <span class="math-container">$Y$</span> is a vector of which <span class="math-container">$Y_v$</span> is a component, so <span class="math-container">$Y$</span> contains <span class="math-container">$Y_v$</span>. And in the formulation presented in the linked paper (and in almost all RNAseq analysis literature), the response is the same for two different genes, so there is only one <span class="math-container">$Y$</span> across both genes g and r.</p>
<blockquote>
<p>the random variables Xg and Xr represent the distributions of the gene expression measure per cell and the gene expression measure per spot, respectively</p>
</blockquote>
<p>I'm not quite sure what you mean by &quot;per spot&quot;. Spots are a microarray term, and don't really have any counterpart in RNA-seq analysis. They were, literally, the spots of DNA oligos printed onto the glass slides used in microarray analysis.</p>
<p><span class="math-container">$x_{gi}$</span> is the number of reads mapped to gene g in cell i, and has a distribution determined by the level of expression of gene g in the cell i.</p>
<p><span class="math-container">$x_{ri}$</span> is the number of reads mapped to gene r in cell i, and has a distribution determined by the level of expression of gene r in cell i.</p>
<blockquote>
<p>and the responses Y and Yv represent the range of the random variable Xg and Xr, respectively</p>
</blockquote>
<p>No. The response <span class="math-container">$Y$</span> represents some biological dicotomy you would like to associate with gene expression.  You could use cell type, but this is neither response, nor covariate, it is not measured independently of X, but is simply a phantom of the correlation structure in <span class="math-container">$X_{ji}$</span>, so I can see why the &quot;response&quot; type language would be confusing.</p>

CC BY-SA 4.0
2021-06-30T17:46:28.480Z
Thank you very much. The terms "response" and "covariate" are now clear to me. Also, your explanations are really useful. I do appreciate it. I accept this answer
MK Huda
CC BY-SA 4.0
2021-06-29T23:05:48.833Z
2021-06-29T23:05:48.833Z
Ian Sudbery
<p>In the <a href="https://satijalab.org/seurat/" rel="nofollow noreferrer">Seurat</a> analysis, if we suppose that Xg and Xr denote the random variables that associate to the expression level of the gene g and of the gene r, respectively. Let Y and Yv represent the responses for Xg and Xr, respectively.</p>
<p>Is it true that biologically, the random variables Xg and Xr represent the distributions of the gene expression measure per cell and the gene expression measure per spot, respectively and the responses Y and Yv represent the range of the random variable Xg and Xr, respectively. The values for Y and Yv are the cell types?</p>
<p>Reference:</p>
<p><a href="https://projecteuclid.org/journals/statistical-science/volume-18/issue-1/Multiple-Hypothesis-Testing-in-Microarray-Experiments/10.1214/ss/1056397487.full" rel="nofollow noreferrer">https://projecteuclid.org/journals/statistical-science/volume-18/issue-1/Multiple-Hypothesis-Testing-in-Microarray-Experiments/10.1214/ss/1056397487.full</a></p>
<p>[Method section 2.1]</p>
<p>I try to understand what is the Random variable and the response in this context biologically?</p>
<p>I am confused to make a biological statements about these response. Please help. Thank you.</p>

CC BY-SA 4.0
2021-06-29T08:43:42.620Z
Its not clear what you mean by "Seurat analysis" Seurat enables the execution of many different analysis types, all of which will be formulated differently in terms of their statistical model and biological interpretation. Further, Seurat performs analyses of single cell RNA seq. The manuscript you have cited is concerned with differential expression testing in bulk microarray data, it is unlikely that the formulation there are helpful.
Ian Sudbery
CC BY-SA 4.0
2021-06-29T17:59:37.210Z
@IanSudbery I am using the Seurat packages and algorithms and then try to apply the multiple testing analysis referred to the article I cited. So, I got stuck with the Random variables and responses terms they used. I meant Seurat for scRNA-seq datasets.
MK Huda
CC BY-SA 4.0
2021-06-29T18:36:39.320Z
The article you reference is discussion differential gene expression in bulk samples between conditions. That is, e.g. if take 1 million cells treated with water and 1 million cells treated with a drug and blend each set of 1 million cells together and measure the level of gene expression in each (which will be the average across 1 million cells), how can I tell if gene expression is different after treatment with drug. This is almost certainly not an analysis would want to be doing with scRNA-seq data using Seurat.
Ian Sudbery
CC BY-SA 4.0
2021-06-29T19:02:04.623Z
@IanSudbery Sorry for misunderstanding, but what I want from the article is to adapt the use of random variables and the term "response" only despite the data they use is bulk samples instead of scRNA-seq datasets. So I am curious the biological meaning of those two  terms.
MK Huda
<gene><seurat><differential-expression><gene-expression>
The biological meaning of the random variables and the responses in Seurat analysis
# The biological meaning of the random variables and the responses in Seurat analysis

(Asked by: username_0 on 2021-06-20)

In the [Seurat](https://satijalab.org/seurat/) analysis, if we suppose that Xg and Xr denote the random variables that associate to the expression level of the gene g and of the gene r, respectively. Let Y and Yv represent the responses for Xg and Xr, respectively.

Is it true that biologically, the random variables Xg and Xr represent the distributions of the gene expression measure per cell and the gene expression measure per spot, respectively and the responses Y and Yv represent the range of the random variable Xg and Xr, respectively. The values for Y and Yv are the cell types?

Reference:

<https://projecteuclid.org/journals/statistical-science/volume-18/issue-1/Multiple-Hypothesis-Testing-in-Microarray-Experiments/10.1214/ss/1056397487.full>

[Method section 2.1]

I try to understand what is the Random variable and the response in this context biologically?

I am confused to make a biological statements about these response. Please help. Thank you.

**Tags:** gene, seurat, differential-expression, gene-expression
> **Comments:**
> **username_1**: Its not clear what you mean by "Seurat analysis" Seurat enables the execution of many different analysis types, all of which will be formulated differently in terms of their statistical model and biological interpretation. Further, Seurat performs analyses of single cell RNA seq. The manuscript you have cited is concerned with differential expression testing in bulk microarray data, it is unlikely that the formulation there are helpful.  
> **username_0**: @IanSudbery I am using the Seurat packages and algorithms and then try to apply the multiple testing analysis referred to the article I cited. So, I got stuck with the Random variables and responses terms they used. I meant Seurat for scRNA-seq datasets.  
> **username_1**: The article you reference is discussion differential gene expression in bulk samples between conditions. That is, e.g. if take 1 million cells treated with water and 1 million cells treated with a drug and blend each set of 1 million cells together and measure the level of gene expression in each (which will be the average across 1 million cells), how can I tell if gene expression is different after treatment with drug. This is almost certainly not an analysis would want to be doing with scRNA-seq data using Seurat.  
> **username_0**: @IanSudbery Sorry for misunderstanding, but what I want from the article is to adapt the use of random variables and the term "response" only despite the data they use is bulk samples instead of scRNA-seq datasets. So I am curious the biological meaning of those two  terms.  

---

## 1 answers

### Answer by username_1 on 2021-06-29. Score: 4 | Accepted answer

In the linked article the authors formalize microarray analysis as the study of the joint distributions of $\overrightarrow{X}\_i$ and $Y\_i$, where $\overrightarrow{X}\_i$ is a vector of random variables, the distribution of each of which (i.e. each of $X\_{ji}$) is determined by the level of expression of gene j in sample i, and $Y$ is some response or covariate of interest.

The response/covariate is the easiest to interpret in terms of biology. It is the condition. So it might be treated or untreated if we were interested in genes that respond to drug treatment, or it might be diseased vs healthy - this would be covariates. Or it might be "time to death", "body mass index", etc. - these would be responses. The difference between a co-variate and a response is which is the dependent and which is the independent variable. In differential expression we have "gene expression ~ disease" (i.e. X ~ covariate), where `~` is pronounced "is predicted by". In the case of survival analysis "time to death ~ gene expression" (i.e. response ~ X).The malleability of the relationship between X and Y is what is meant by

> "The population and sampling mechanism will depend on
> the particular application"

A random variable is any variable that we cannot know the value of until it has been measured. Note, this is *not* "do not" know the value of, its "can not" know the value of. So for example, in this case of RNA-seq, X is not the gene expression, it is the number of reads. An all-knowing daemon could know the gene expression for a gene in a sample before we measured it, but they couldn't know how many reads we will get because of the randomness introduced by sampling.

Random variables don't *represent* distributions, they *have* distributions. That is, if you were to realize many trials of a random variable, the values you obtained would form a distribution.

So the number of reads you get mapping to a particular gene in a sequencing experiment is a random variable. As is the brightness of a spot on a microarray. Its an interesting question to ask if $Y$ is a random variable. The answer is "it depends" - and what it depends on is how good we are at controlling an expriment. You might argue that "drug treatment" is not a random variable because we treat the cells or not - we know, but that, say "time to death" or even "age" is a random variable, because we don't determine it ahead of the experiment. Either way, this subtlety is covered by the above quoted sentence.

So, in a traditional bulk sequencing experiment we have a matrix of random variables associated with gene expression $X\_{ji}$ - the number of reads for gene j in sample i, and $Y\_i$ the condition for sample i. Note that $Y$ is indexed by the sample, not the gene - every gene in the sample uses the same value of $Y$. And for each gene j we test the model `X_i ~ Y_i` - the expression in sample i is predicted by the condition of sample i.

In a single cell sequencing our matrix of random variables associated with gene expression is actaully a tensor, that is, it has three indexes, not two: $X\_{jki}$ - that is the number of reads from gene j in cell k in sample i. In a scarily large number of single cell sequencing experiments, i only has one value (i.e. there is only one sample). And in most single cell experiments I've seen $Y\_i$ only takes one value, even if there are multiple samples. Even if $Y$ takes multiple values, its not clear what sort of model you'd fit to the structure `X_{ki} ~ Y_i` - i.e predicting a matrix of many cells by a single vector of covariate values.

I think one analysis you can do with Seurat is to treat each cell as a separate sample, and each cluster as a condition, and thus try to find gene DE between cell types. I'm not convinced how great this sort of analysis, but here, the i in $X\_{ji}$ would represent which cell a measurement was from and $Y\_{i}$ would represent which cluster. But this sort of analysis seems prone to all sorts of date-peeking and training set leakage problems.

> if we suppose that Xg and Xr denote the random variables that associate to the expression level of the gene g and of the gene r, respectively. Let Y and Yv represent the responses for Xg and Xr, respectively.

First, $Y$ is a vector of which $Y\_v$ is a component, so $Y$ contains $Y\_v$. And in the formulation presented in the linked paper (and in almost all RNAseq analysis literature), the response is the same for two different genes, so there is only one $Y$ across both genes g and r.

> the random variables Xg and Xr represent the distributions of the gene expression measure per cell and the gene expression measure per spot, respectively

I'm not quite sure what you mean by "per spot". Spots are a microarray term, and don't really have any counterpart in RNA-seq analysis. They were, literally, the spots of DNA oligos printed onto the glass slides used in microarray analysis.

$x\_{gi}$ is the number of reads mapped to gene g in cell i, and has a distribution determined by the level of expression of gene g in the cell i.

$x\_{ri}$ is the number of reads mapped to gene r in cell i, and has a distribution determined by the level of expression of gene r in cell i.

> and the responses Y and Yv represent the range of the random variable Xg and Xr, respectively

No. The response $Y$ represents some biological dicotomy you would like to associate with gene expression. You could use cell type, but this is neither response, nor covariate, it is not measured independently of X, but is simply a phantom of the correlation structure in $X\_{ji}$, so I can see why the "response" type language would be confusing.

> **Comments:**
> **username_0**: Thank you very much. The terms "response" and "covariate" are now clear to me. Also, your explanations are really useful. I do appreciate it. I accept this answer  

---

