Biomedical Data Modeling
Transcript
Good morning, everyone. I'm Alex Bui, co-director of the BD2Ks Center's Coordination Center. Welcome to another BD2K Data Science seminar. So last time, we actually concluded section three, which provided an overview of computing, and we heard about some of the work that NIH is doing in developing cloud-based infrastructure to support biomedical big data science. Today, we actually started a new section, section four, which is focused on data modeling and in inference. And any of you who have had to work with big data datasets will appreciate the challenges that are associated with both understanding the data, and using it to uncover patterns. So over the next few weeks, we'll have speakers talking about a range of techniques that are related to modeling inference tests. And to kick off this section, we're joined by Dr. Fafael Irizarry, a professor of biostatistics
at Harvard in the school of Public Health, and a member of the Dana-Farber Cancer Institute. His work focuses on genomics and computational biology problems. In particular, he's worked on the analysis microarray next generation sequencing and genomic data. Dr. Irizarry has developed several online courses on data analysis that are offered through HarvardX, including data analysis for the life sciences, and genomic data analysis. So please join me in welcoming Dr. Irizarry this morning. Dr. Irizarry, thank you for joining us today. The floor is yours. Thank you. Thank you for inviting me. All right, so a quick overview. Can everybody hear me? Just double checking. Yes? OK. Yes. All right, great. So as a quick overview, so you know what's coming, I'm going to divide this into two parts. I'm going to very quickly review some basic inference and modeling since this is what the lecture is about. What I
want to do more than give an introduction of introductory material is to show how I use it in my research to put it in context. I'm going to show two parts, one, somewhat simple inference, basic inference, and then the second one a little bit more advanced, more complex, relating to exploration in modeling and how it's very important, or have I have found it to be very important for understanding and improving the quality of information that comes out of high throughput measurement. I've been working for the last 15 years mainly in genomics with developing statistical methodology for measurements that come out of new technologies, such as microarrays, next generation sequencing, and it's different applications, because these technologies have many different applications and for each one, different statistical challenges come up. And it's been a data science since I've started. The problems
are very much driven by the data. People are using data to discover new things. So even before that term became widely popular, people in genomics were big into data science. All right, so there's much more information on my web page of what I want to talk about, and also I make announcements on Twitter about new research papers, new courses, and other things. So here's a course that was-- here's a link to the course that was described. It's free. It's a free course. You can take it self-paced. There's currently seven different courses that go in order of difficulty, starting with the simplest one, where introductory statistics is presented along with R code to be able to implement that knowledge. There's also a book that goes along with that course. It's also free. You can get it on Leanpub, and it comes out as a PDF. If you want a hard copy, that's not free and you
can get it on Amazon. And one nice thing about the book is that it basically-- the code, you need to reconstruct the book with all the data analysis in it is included on GitHub. There's links to it within the book. So you can not only read it and learn statistics, and computing, and coding in R, but also you recreate the book and learn it that way. All right, so just need to get started, I wanted to go back to the most simplest concept in inference, and those that already know this, bear with me. It will only like five minutes. And basically, what I'm going to do is explain what the little stars on top of the buildings with the antenna that we see in scientific papers means. So that's what they put on the graph to relay that it's statistically significant. So I'm going to just go over that for five minutes and then explain some subtleties how
this has come up in my research. So to give a very simple example, suppose we have two groups, and basically just to make it simple, I'm going to use men and women and heights. And what I have is a population of men and women. You can take the mean of the man and the mean of women, and those two means may or may not be different, but suppose we don't know. We come from outer space and we don't know that that's the case. So we want to know,
and we could just measure everybody and come up with an answer, or we could take a sample. So if we take a sample of 10 people of 10 of each, we then get data. So here's what it would look like. Here's an example of a sample. This is an actual sample that I took with using pre-measured heights, and we can see that there's a difference between men and women. Men are taller by three inches in this sample. So inference is the part of
statistics that helps you understand if this is-- how much can this very, and how consistent this is with the actual means being the same or different. So we basically are interested in the means of the population. So we look at the sample means and then use that to try to answer the question. So here's one way to see inference, to understand inference. So we did it once. I'm just going to do it for the mean heights, not for the difference for now. The important concepts to get here is that
every time we take a sample the mean changes. Here's the mean of men for the first sample I took, but if I take another one, it will be a different one. I'm going to start making a histogram where these height's pile up, and you see that we get different values every time, and we do it a million times. We eventually you get a distribution of the heights, of the average heights. And we can see how much it varies. It varies from around 67 to about 71, as for 95% of the data is, of the outcomes are. This tells us, wait a minute, we saw a difference, but it could have been different. How different could it have been? Well, this distribution helps us understand that, and that's the general principle behind inference. But understanding that the population has variability, and that there's tall men and short men, et cetera, and the fact that we take a sample results in the average heights having variability as well.
So if we make the sample bigger, this is one of the things we learn statistic classes, then the variance of that mean gets smaller. So you can see that this distribution is not as fat. So this is what you statistic classes, that that mean and those means, both for men and woman, is going to be approximately normal with the population mean, standard deviation divided by the square root of the sample size. The way we use this in biology very often is by constructing a t statistic, and we can do it using some mathematics. Once we model them, we know how much that t statistic should vary just by chance, and from there we get P values, and confidence intervals, et cetera. So that's just a reminder of what we're talking about here. Sometimes we don't assume normality, we use a model and assume the t distribution. I'm not getting into that yet. OK. So, I'm going to give you an example of
how that simple concept has-- this was a research activity of mine a long time ago, and this actually keeps coming up, but how the concept was not being clearly understood by collaborators and other people publishing papers, and we did a little experiment to kind of point out the problem. So I'm going to give you an example, and it relates to the decision sometimes made by biologists or experimental biologists to pool their samples to reduce variance.
OK, so here's an experimental design that is very common in biology. Let's say now, let's talk about gene expression. That's one of the topics that I work in. So we have a microarray and we're going to get gene expression for 12,000 genes. For each gene we get 12 measurements. Now I'm going to just focus the discussion on if we had just one gene or two genes. We have several mice. What we want to find out is if a gene is differentially
expressed in two different strains. So we follow the procedure we just talked about with the heights. We get 12 mice of each strain, we're going to measure the gene expression for a given gene, and then try to answer that question. So if we say yes, then we say yes, this is differentially expressed, then what we're saying is if you do this experiment in your lab, you will also see it be different. That's kind of what we're saying. Many of my collaborators were doing something that actually kept them from answering that question. How was that the case? Because they pooled the data. They pooled the data from the 12 mice, and then they created four technical replicates. When I asked why, they will say because that reduces the variance. OK, if you're doing that, that means you don't understand statistical inference, and I'm going to explain why that is. This is the experimental design. We take 12 measurements with 12 mice, pool
them, and then create four replicates of the pool. Once you do that, you will not see the variability across the mice. Imagine if you're doing this with heights, that would be taking 10 men, measuring their height, measuring their heights 10 times, and then reporting the average of the 10 four times. So if you just presented this to someone who didn't know anything about heights, they would think that there's no tall men and short men. There's just one man, and there's a little bit of measurement error when we measure it. So here's an example. This is not a cartoon. This is data from the experiment of two of the genes in the microarray. These are two genes that when they look at, they compare the two groups, the two pairs of four replicates that were coming from technical replicas. These four and four, that's how you see four
points, four and four. We get these two genes with very, very small t values, the chance of seeing something like this by chance using this t statistic we just described is very, very small. It's definitely significant. Both genes are like that. So we write we write a paper and we say, these two [INAUDIBLE] expressed. If someone else runs this experiment, are they going to see this again when they do it? And the answer is we actually don't know. Why not? Because now I'm going to show you the original data. Now I'm going to show you this. This is actually an experiment we ran to kind of make this point. I'm actually going to share this data, because in the experiment we ran, we actually kept both. We kept these 12 measurements, these 12 measurements, these four, and these four. So now look at those two things. So that is now telling a very different story. The first gene has a lot of variability, and the second
one has less variability. This is a much-- you say it's more consistent. So now when I do it like this, only the second gene has a significant p-value. The first one doesn't. So if someone ran this experiment again, they would actually not confirm gene one, but they probably will if they have enough power. They probably will confirm gene two. So the lesson here is you want to see the variation because for the inference you're doing, it is important. It's part of the framework of inference that you do for this. This is something that comes up over and over again, where the variability that's important to inference is not understood and many mistakes are made because of that error. So here are the two genes next to each other. There's another example, I think, of two things that are like that where one is very consistent, the other one isn't, but when you pool you don't really get to see that.
We actually wrote a paper on this. It's not just about this. It has other things I experiment. It's about experimental designs, when you need to pool-- in that case, it actually explains this in more detail, and it's published in 2005 in PNAS. OK. So one of the morals of the story of that particular example is that the biological variability, it's much bigger than technical variability. I think that's going to be common in many, many of the measurement
technologies that we have in big data and biology in general. That we're going to get more and more precise technical measurements, but human variability, or whatever we're measuring, won't go away. Another thing I would like to mention in our class about inference, in a talk about inference, is the multiple comparison problem. This is obvious to most, but I still see papers coming out that do not correct for multiple comparisons
in any way, and so I want to just briefly mention it. I guess I just awkwardly use these slides. I'll just described describe the problem. In the case of gene expression, you have high throughput-- sorry, in the case of high throughput technology, we are-- and we're trying to find, say, differential expression, differentially expressed genes. It could be other things. It could be differentially methylated CPGs, it could be differentially binding transcription
factor binding sites, et cetera. We're exploring a big space. We're testing my hypothesis. That's how a statistician would say it, and one thing to keep in mind is that if you test 10,000 hypotheses and you restrict the genes you report, or whatever units you report to 5% p-value, you're going to get 500 incorrect reportings when the null hypothesis is true. So if you don't understand-- many of you probably are thinking, yeah, I know that, but if you don't know exactly what I'm talking about
here, definitely go read up on multiple comparison. We have a course that covers it. It's in the book, but there's many other books and other courses it that describe ti. All right, so that's the first part of the talk. I know it was very basic. Now, I want to go to some more complicated topics, the complex topics, where statistical modeling has helped and also exploratory data analysis, which is I know it's not in the title of the topic, but it's as important or perhaps more important, I think, in the analysis of what today we're calling big data. I'll do through examples in the second part. OK, so the first thing I want to warn against is our desire for wanting to have workflows. This is a screenshot of what you get on Google Images when you Google workflows and biology, or in biomedical sciences. You get a bunch of things like this, but if you look at them
closely, many of them basically come down to a workflow like this, describing a way to go from big data to knowledge. That's the title of the graph. So you start with big data and then you go through this process, it's the use of boxes, and at the end there's some list, or some figure, and you're done. You discover something or learn something. One of my goals here is to remind listeners of how important it is to think hard about what these boxes are doing, and sometimes
make sure that they're doing what we think we're doing. It's many times the case that the procedures that we think are standard procedure, and we can just stick them into the workflow will work, and it turns out that just by looking at a few plots, we quickly realize that it's absolutely not the case. That this actually leads to knowledge, instead it leads to false positives and confusion. So what I want to do is I want to explain examples of where this workflow that people were using without exploring data, just by kind of turning the crank, we're leading to problems. All right, so here's a quote from John Tukey, that kind of relates to what I just described. All right, so to motivate this, I want to-- I also want to motivate the improvement of the boxes in the workflow. Not just saying we're going to keep you from making mistakes, but we actually want to help
you make discoveries. It's not just about being policemen or about being a Debbie downer about what people find, but rather two things. You'll have less false positives, but also you will have more true positives, hopefully. To motivate that out, I always like to go back to the discovery of the microscope, which-- not the discovery of the microscope, the improvement of the microscope, which led the person who first improved the microscope enough, it led him to become the father of microbiology. So simply by-- no, not simply, but when people were looking through microscopes, other scientists were trying to discover things, but they were seeing blurry images. He improved the microscope and he was able to see something that nobody else saw, and now he discovers microbes. He discovered are many, many other things that are microscopic because he was the only one that could see them.
So in my field, in high throughput biology, I feel like the data scientists are often not just keeping people from making false claims, but also helping people put their data into focus and make discoveries. Here's another quote from Tukey related to that particular topic. When it comes to data, which is what we look at now, we don't look through microscopes anymore, although some people do, we look at data. We have digital data that the data
scientists turn into images, that then biologists or other scientists turn into knowledge or extract knowledge from. And making figures is exploring data, is a key component of doing that properly. So I'll give you now, concrete examples from my own research related to what I just described. I'm going to talk about two problems, two examples, and there's many more, which I won't have time to talk about. If you want to read
more about my own personal experience in this, a lot of my current papers relate to this particular topic, and you're of course, welcome to look some of those up. And I think it's happening all over the sciences. It's not just in genomics. It's not just in biology, but improvement of data analysis [INAUDIBLE] by careful data exploration and thinking of how to properly model data, is leading to a lot of improvements in how we interpret data. OK, so here's an example. This is again, not
a cartoon, this is actual data. This is actual experimental data. I'll explain what it is now. So the data that I'm presenting in this plot comes from public repositories. This particular one is a gene expression omnibus, and this is a great resource. It has any published gene expression experiment is supposed to be in either Geo, or in a European database called Array Express. So you can go there, and what I did for this
one is I went there I got data from five different tissues. So there's five different tissues represented in this figure, and I obtained gene expression data from them from microarrays, in this case. So that means for each sample I have 12,000 measurements. So it's a 12,000 number vector, and I have more than five points because for each tissue I had several individuals. So there's about 50 points because for each issue, I have about 10 people on average.
So I have these factors. I have about 50 factors that are in 10,000 plus dimensions right because I have one number for each gene. So that's something I can't really plot, so instead I'm going to plot the first two principal components-- that's what I'm showing here-- of that big matrix. If you don't know what principle components are, it's a very, very simple explanation of one of the things you can do with them. Each point here represents one of the samples that is originally 12,000 dimensions. I have reduced it to two dimensions. It was 12,000. And the nice property about this particular summery is that the distance between any two points resembles the distance between the original 12,000 dimension vector. So now when I have it in two dimensions, I can actually see what's close and what's not close. So in this plot I can see that these points
are close, and then we have these points are close, these points are close, et cetera. So these points are close, so I would tend to think, well, those are probably from the same tissues. Different tissues have different gene expression patterns. That's one of the reasons they become different tissues in the first place. So I should see here, five clusters. I don't quite see them. Now, I'm going to reveal what the tissues are, and you can see that it's not really what we were expecting. So these guys that were close together are different tissues. These are colon and these are placenta. And we have some colons down here that are way farther from these colons then they are from here. So you can see how there are problems in the data. So I would say that this data is out of focus, or this fact that we thought we knew about gene expression in tissues is maybe not true. So if you just
go down the pipeline workflow, and run this data through it, and ask for clusters, you conclude biologists are wrong. Gene expression between tissues is not that different, and that would be a mistake. So because if we then dig deeper into the data, forget the workflow, let's go back to the data and dig deeper into it, we're going to find that there is a lot of noise in the measurement. So now we're going to take one point, and instead of just reducing to the two dimensions, we're actually
going to look at all the data, all the 12,000 points. And this figure shows you that. So now we have the 12,000 points. You can see there's 12,000 little black dots, and the plot is made in a way that reveals what we're interested in when we look at compared two samples to see what genes are different and which ones are not. We have the log ratio of the two measurements on the y-axis. So for example, this gene is 16. It's log based
two. This gene is 16 times bigger on one sample compared to the other, and these that are at zero are the same. The log ratio is zero. So this particular dataset is not one of the ones that you just saw. This is from an experiment that a company ran, and they were nice enough to share it with us just to test out the technology. And what was done for this experiment was they took two samples that were the same. How did they know they were the same? Because
they took one RNA sample, a vat of material that had RNA molecules in it, and they randomly split it into two. They just split into two equal parts, and then they ran the experiment on those two. So if the technology is working well, there's enough molecules there that things will average out and it should be the case. And when we compare them, when we measure gene expression in these two, it's basically the same sample. We should get the same answer for every gene. So this mass of points should really be around zero, or close to zero. Now, you can say well, sure, there's measurement error. OK, that's very possible. However, the people who ran this experiment included 16 genes. These are the orange ones. They're represented in orange here, where they knew there were actually different. They made him twice as big for real. They actually artificially
made them twice as big in one sample compared to the other. So these 12 points are the ones that should be different. The black point should be at zero and these black points should be at one. So this gives you an idea of what signal looks like. This is a problem now. If the signal is this big, then this is a problem. Because if I gave you this picture and I said find me the 20 most differential genes, you would probably say, well, this one and that one, and this one and these. These are all big. You would never come down to these 60. So there's a lot of noise in the data. So why is that? Why is there so much noise in the data? Is this just the way biology is? Or is this the way that the technology works? And if it doesn't, we might as well stop buying this product. Well, so, to answer this question one of the things we did was go even one step
further down the data. These points actually come from even rawer data, and we read how that was done, how they actually got to here, and we noticed that there was some modeling going on. There were statistical modeling happening when they analyzed the data to get to these points. Here's sort of what the model was for doing this. So what was happening is that these measurements, the manufacturers realized that when they were trying to measure the expression of a specific gene, they were also measuring background noise. So even when a gene was not expressed, the unit that was measuring that gene would give values, big values sometimes. And they also noticed that different measurement units produced different background levels, which was a problem because now when you have different gene expression measurements in two different genes, the only reason you might
be seeing that is because you just had two units that worked that way. One measured high background, the other mentioned low background. So they thought of it like this. The model they thought about was like this. You wanted to estimate gene expression, here represented with a beta, but there's background that's represented with the alpha, and every single measurement, every single different measurement unit had a different alpha. So it wasn't like a global alpha they can remove. You had to remove an alpha for each single measurement. Every unit had a different one. Every measurement unit had a different one. If you see your measurement as seven, you don't know if that's four plus three or two plus five. You have no way of knowing that. So to determine that, what they did was they said, let's add measurement units to this instrument that measures just the background.
So now we have two measurements. One measures the background plus the signal, the other one just measures the background, and what we'll do then is we'll subtract it and we'll get B, and we're done. Problem solved. But here's the problem with that model. We did another experiment just to get an idea of how off this model was. The problem here is that there's no stochasticity described in the model. We ran an experiment where we
knew there was no beta. We ran an experiment that was just a negative control, and in that case we should just be seeing alpha and alpha. So here's a plot of that and you can see that it's not right on the line. It's correlated. That's good. But it's quite a bit of noise. This is in the log scale, so that's quite a bit of noise that you're seeing there between Y1 and Y2's measurement of alpha. So the problem with this is that the actual model should look something like this since there's-- Now this is actually a statistical model where there's randomness included. We have alpha 1, alpha 2, not just alpha and alpha. They're different quantities. They're correlated. In the log scale, the correlations is about 0.7. You can see that's the correlation there is about 0.7. So if that's the case, if that's the model, that's a model that to us makes more sense.
That implies that if you then look at things log rations, which is what people were using to quantify differences in gene expression, then the variance of the log of that difference-- because that's what they're using as a measurement, the difference between Y1 and Y2. The variance of the log of that difference we can show mathematically. I'm not going to show you here. It's using something called Taylor's expansion. It's not important. We can show that variance is proportional to the reciprocal of the signal squared. That's mathematics. That's not biology. That's not problems with the technology. It's the problem with decision they made, the mathematical decision they made of how to correct this measurement. So if you look at this formula, then you can see that you see it here. If you draw a line of the variance here, you just go by the points.
If you draw a line of the variance it would go like that. That function is 1 over x squared. Well, it could be. We would need some constant, but it's very consistent with what the math is predicting. One over b squared, one over b squared. This would be b, right? This is the signal. The average of the two measurements is an approximation of the signal. So that in mind, now that we have a model, we can come up with a better statistical solution
that doesn't have this property. We can do that. We have a model in place, now we can do math and figure out, OK, what transformation of the data would estimate data without having a massive variance? And we might introduce a little bit of bias just to reduce the variance, that's one approach that is often used in statistics. In machine learning that's called shrinkage or regularization. when we do that, with that in mind, we can construct a solution based on the model, and we can go from this plot to this plot. That's without any new experiment, nothing new. Just the same data processed differently. We get rid of all that noise that we were seeing earlier, and now if we asked you to give me the biggest differences, you would definitely start with some of these orange points. So that's quite a big improvement. Again, that was just the result of changing
the way you model the data and developed statistical solutions for it. So that idea was turned into software, and now today, when people use these technologies, most-- still not everybody, but most I would say, use a technique like this rather than what was originally proposed. All right, so that's one example of how statistical models can improve measurement data that you would then use to make this biological discovery. For example, let's go back to the motivation
example. Here are the data that you started with, which I would say is really out of focus data. This is processed with the original algorithm. Once I use this new idea that comes from a more rigorous statistical model, you end up with a plot that looks like this, and that is now much more consistent with what a biologist told us. Gene expression parents from the same tissue are similar to each other, and they're different from different tissues.
We see the five clusters very clearly. If we didn't know that, we would actually discover it because if you looked at this data without the colors, you would be pretty sure there's four, maybe five clusters, and you would be onto something. All right, so now moving on to another way in which statistical modeling helps us. Quite different. I like to talk about this one because it's-- I think, currently, the biggest challenge in genomics is dealing with what we call the batch effect, and I suspect we're going to see batch effects in pretty much any kind of measurement technology that is collected across time. You'll see what I mean as I as I describe this. OK, so I'm going to use an example. This is a paper that used the standard workflow. They followed all the best practices. They had raw data, they processed it with the recommended
processing algorithm, they did the t-tests correctly, then they did Bonferroni correction. So they dealt with a multiple comparison problem in a very conservative way, and even after that they report. Even after that conservative use of Bonferroni to not make type I errors, they conclude that 1,097 of the 4,197 genes that they tested show a statistically significant difference between two different ethnic groups when you measure gene expression in blood.
So that's a big number. It's contrary to what most people would think was the case. I think if you ask somebody before this paper was published how many genes are differentially expressed between two ethnic groups, they would probably say between 0 and maybe five. That's what I would have answered. Instead they get 1,000. So they got their paper published in a very prominent biological journal because it's a surprising result.
All right, so now let's forget the workflow and let's go back to the data and look at it. So you can actually get this data from Geo. This is the data from that paper. You can see there is about 200 points, 209 I think. So each point now, it's not a different issue, each point is a different person, and each person has a profile of-- they say out of 4,000, but I think the original number was 8,000 that they filter down. So this is a
technology that measured about 8,000 gene expression genes. Mapped expression for 8,000 genes. For each person you have a vector of 8,000, and then we reduce it down to two, PCA just take a first look at the data, and we can see that the results here is very consistent with what they were saying about 1,000 genes being different because there is a very clear difference between the two ethnic groups being compared. You have the orange and it's compared against the green. The first principal component is very different. That to me is very consistent with what was published. Now, looking at this data there's something else that catches our eye, and it's that we see other clusters, not just the ethnic groups. If you look closely at the orange group, which is all the same ethnic group, you see-- I see at least, I see a cluster here and a cluster
here, and then I move here, there's another cluster here, and you can kind of see another one here. But regardless of that, if this group shows this much variation, why is this group showing this much variation? That's a lot more. That's double or triple. So when we see a picture that, you start wondering what else could explain this difference? And in this case, there's a group of scientists. It wasn't my group, it was another group that decided to noted-- I don't know how they originally noted this, but they noted that these samples were processed across five or six years, and it turns out that when you get the raw data for this, you can actually get the date. It's actually stamped on the file where the data lives. Now I'm going to show you the same plot. Points aren't going to move. All I'm going to do is change the color to represent date, year,
instead of ethnic group. OK, so now when I do that, I can see that those two clusters that I kind of could see before, right here and here, one is greenish and the other one is the orange. That's 2002 and this 2003. So that was the moment in which these measurements were made. Not when the people were born or anything like that. It's just technical. Then we see 2004 here, 2005, 2006. So, is this variability that we see described
by-- is it really just the date? The batch? We call them batch effects because these are things that were processed in batches. It wasn't just done once. So this particular experiment, it's a little bit hard to distinguish between ethnicity and date because it's confounded. If you go back and forth, you see that the orange points coincide with the green and orange, here, and that the green coincide with the pink. So they were basically done
in different years. So when you compare two things, it's hard to tell is it year or is it ethnicity? You can do more data exploration, and if you do I think you'll be convinced that it's probably date what's making this so variable. Here's one example. This is the first principal component stratified. Now I'm going further. Instead of year, I'm doing it by month. So this is one ethnic group, here, all these orange ones, and you can see that the first principle component drops dramatically in February of 2003, and then it drops again in April, and then it kind of stays there. So maybe they were buying boxes of whatever-- we don't know what it was, but you can definitely see that there's a big change within the group, which is explained by month. So when I see a picture like this, I say well, I want to do this experiment again. I want
to balance everything and see if I get a different answer. All right, so now let's explain this with inference and statistical modeling, this batch effect, which is ubiquitous in high throughput technology measurements and beyond. One thing I should mention as an aside, we can see the batch effect very clearly in high throughput technology. In low throughput technologies, it's not always obvious, but it's harder to see if it is there.
So in a way, high throughput technologies maybe being negatively affected because of the fact they reveal something. Because they're more informative, you actually can see the problems. When it's not as informative, it's low throughput, you might be there, but you don't see it. So don't think this is just a problem with high throughput data, it's just that we can see it with high throughput data. I'm going to give you an example of a low throughput experiment that had a huge batch effect in a second. All right, so here's a general-- just write it down with the inference model, with a statistical modeling approach of why this is a problem, and I'm going to write it in more general terms. So I'm interested in the difference between two groups. In this case, it was too ethnic groups, but it could be something else. We earlier did two strains of mice, and before that we did two sexes or genders.
So you have two groups, group one and group two, and we're going to take several measurements for each one. We're going to take several individuals from each one. So that's what the i is indexing. So we have several measurements for one, several measurements for two, and what I am assuming is that-- or the way I'm modeling this is that there there's this mean. There's a mean value for that group, alpha, and then there's differences between individuals, which are described with this term here. This is sometimes called measurement error, but in the case of heights or gene expression, it's other things. It's not just measurement error in the case of heights. Some people are tall so they have a big epsilon, some people are short so they have a negative epsilon. OK, then the second group has the same mean, and perhaps, that's what we're going to test, it has a difference that is parametrized with
the beta, and then they also have measurement error. So what I'm looking for, I'm looking for genes or-- in the previous case, I was looking for genes that had betas different from zero, and reporting those. All right, so how do I find beta? We already went over this, but here we go again. The difference between the two means of the two groups is going to be approximately beta. The alphas cancel out. The epsilons average out to zero if we take enough measurements. So this is approximately beta, than what we did with the t-test is to go further and say, well, it's beta, but we also know that it has a standard error, which has to do with the population variance and the size of the sample. So that's the standard statistical approach to doing this, and that's what that was done for the previous example we talked about when they were looking for genes that
were different in the two groups. Now, when you have a batch effect, that model is no longer correct. Instead-- and here I'm showing an example where the batch effect was confounded, meaning that group one was done in one batch, group two was in another batch. So this W that I'm showing you here, is the potential difference introduced by being in a different batch. Note that there's no i. So each batch has its own mean value.
So if I have this, if this is my correct model then I have a problem because this is no longer the case. This should be alpha, sorry, this guy here. The alphas no longer cancel out. I'm sorry, the alphas do cancel out, the epsilons still average out to zero, but these W's, they stay. So when I look at the difference in the average, what I'm seeing is-- the difference I'm interested in plus the difference in the average values introduced by the batches. So if I look at these differences and I see
a five, I don't know if it's two plus three, or zero plus five, or five plus zero. I have no way of distinguishing that. I have no information. I have no way of separating that when it's completely confounded. That's the problem with confounding batches with outcomes, and unfortunately that happens a lot in these experiments where they get all the controls, and they run them first, and they then get all the treatments and run a second. I see it all the time, this is the type of confounding. Another way to think about this, for those that are more advanced statistically, is to think that these Ws are random variables, so it's like a random effect that each batch introduces. It's the same across batches, so the way that this is then turns into a description of the problem is that the variance that we estimated for our estimate is bigger than the variance due to W, than what we actually

Ask anything
We've read this whole study set, so questions about it get the best answers.