 This video is about a couple of things. One, it's about a dipole moments experiment that we do in lab, but mostly it is about analyzing a complicated formula and doing some propagation of errors on it. So even if you haven't done the practical, you can probably watch and figure out how to do this because I'm going to bung the data into Excel and do a couple of tricks for doing propagation of errors. Now, if you haven't done a dipole moments practical, you haven't done it with me. Well, it doesn't matter. Let's briefly explain what I've got down here on the visualizer. This big master equation is probably one of the more lengthy ones that I set in teaching labs, and there's a lot going on in it. So what happens in this experiment slash practical is we have nitrobenzene and which is a polar molecule, although it's oxygen's drawing electron density towards it. And we dip it into, or at least we increase the concentration in cyclohexane. That's a very air-polar molecule. And then we're going to measure two properties. One, we dip a capacitance meter into it and we work out the dielectric constant, also known as relative permittivity. And we also dip it onto a refractive index instrument to work out the change in refractive index as we increase its concentration. And that's the raw data that goes into it. And then we throw it all into this massive equation and we get the dipole moment down. At least the dipole moment squared, we square root it all at the end. So what else is in this equation? Well, we've got what's, we've got the raw data here, and we've got the molar mass and the density of the solvent, and then we've got the relative permittivity of the solvent, plus two squared. Why? I don't know. I didn't really read the paper for this. The Boltzmann constant, the temperature, and Avogadro's number. So quite a few bits of pieces going in there and working on it. We bung that all in. We get the realt. So I've got this in Excel. Let's go have a look at it now. So I've got the raw data here. Have a look at it. The weight fraction goes up from zero to about six percent. So it's not very concentrated, but nitrobenzene is very not the nicest thing to work with, so you don't want to be high concentration. And we can see this dielectric constant increase slightly and also the refractive index also increases slightly. So those are two changes to do with the dipole moment of nitrobenzene that we can then measure in the lab. And we graph those. We can see they produce two really neat straight line graphs. A little bit of noise. This is real data that a student's acquired in the lab rather than it's probably not the best data, but it's good enough. And what we really want to know is what's the uncertainty associated with these? So what I've done is I've got the gradients out using the line stats function. You can see that there. And that also gives us the plus or minus standard error. Down here, if you've seen the previous videos on how to do things in Excel, this will look familiar. I've got my list of constants here, their values, and then an indication of the units. And the only thing that's really worth noting here as you're doing this is all of them are in the standard SI units. So we're not talking grams per mole. We're actually putting in kilograms per mole. So if we plow all of those in, we've got this long convoluted equation here that calculates this constant at the beginning, then a difference in the two gradients and then mu squared and mu. And then we're converting it into Debye. So Coulomb meters is the standard SI unit of the dipole moment or Debye when we convert it to some other format of units. But it's actually quite convenient to stick it in at a number that's 4.84 as opposed to 1.61 times 10 to the minus 29. We can get numbers like that on our head a little bit. So that's all thrown into Excel using the find names which you can see here. So how do we then go about calculating the error of it? I've got some templates set up here. We're going to go through that in a moment, but for now let's have a look at just the theory behind it. So what are our propagation of error formulas? Well, it depends on what we're going to do to two things. So what we could do if we want to work out the error in the dipole moment is run this experiment again and again and again and work out a standard deviation and a standard error. We could do that. That's fine. There's probably enough student data for me to do that. Now all we can estimate it from the equation knowing what our inputs are. So how we manipulate the inputs together matters. So let's say I've got one number A and another number B and I add or subtract these together. That's a linear version to get X. Then on uncertainty in X and I'm going to use this notation here. If you haven't seen this before, it just means uncertainty of X. It's the notation I inherited when I learned this. That is equal to the square root of the uncertainties of all of our components squared. So the uncertainty of A squared and the uncertainty of B squared. Add them together, take the square root. Very similar to Pythagoras' theorem. They're uncorrelated errors. That's not entirely a coincidence because Pythagoras' theorem is like addition for quantities that are orthogonal. It's a little broader than just right-angled triangles. There are other ways we can combine A and B. If we do A multiplied by B, for instance, or A divided by B, it's actually the same formula that gets us X, then things are sort of the same and sort of different. So we have the uncertainty of X divided by X on this side of the equation, also known as a relative error. We could express this as a percentage. This doesn't have a unit because we're dividing the unit of this by that to make it dimensionless. This does have a unit. And that is all very similar. We're squaring some values together and it's the uncertainties of A and B divided by A and B. So again, relative error of A, the uncertainty of A divided by A, that's a relative error. We could express it as a percentage and the same here for B. So we get those two. Now the remaining thing, we've got this squared here and this doesn't always pop up when you look up propagation of errors. So you may need to search for this formula, but I'll just write it down here. If we have X and it is equal to A raised to the power of B, for completion we'll just stick a constant on. Let's put C here. Then the uncertainty in X and it is a relative uncertainty. So let's write it like that. Again apologies if the changing of colors is a bit of a pain, but it helps me keep track of what we're talking about. Then this is actually a lot easier than you might think because it is simply B multiplied by the uncertainty in A, at least the relative uncertainty in A. So if we know that quantity there, that relative uncertainty A, we just multiply it by B and here's the fun thing about it. We don't need to worry about what that constant is. That doesn't come into it. It just scales normally because we're dealing with relative errors here. This is kind of a recurring theme. Usually if you're just scaling something from one side to the other, which is all C is doing, then the relative errors remain the same. So if we just had C multiplied by A, then this would hold true as well. We just wouldn't have B here. The C wouldn't matter. So with all those formulas in mind, let's have a look at this and let's see what we're actually going to do to it. So the ways that we need to look at this is to realize that all of these have negligible or non-existent errors. Boltzmann constant, that's pretty well known to have many significant figures. Temperature, we can get that to three or four significant figures, no problem. Avogadro's number, that doesn't have an error associated with it anymore. Last year it got redefined to be exactly a normal, just an exact number. These also not much of an error associated with them. There's three at a number, right? And the mass and density. We can get those to three or four significant figures. It's going to be relatively negligible. All our experimental error is going to come from these two numbers. So that allows us to simplify things down a little bit. Let's start with mu squared and it's going to be equal to C, a constant. All of that stuff I've written out in black is now C, a constant, and it's going to be multiplied by A minus B. And that's it. That's it. What this all simplifies down to. And we can do one better than that because we can take the square root to the other side now. So let's get rid of that square root and we could put it down as a square root over the whole thing, but it's a little bit more convenient for when we're looking at this formula to realize that square root means raising something to a power of a half. So I can put it here and also here. So it would be the whole thing multiplied, raised to a power of a half, but then because these are multiplied together when we'd expand those brackets we do that one to the half and that one to a half. And that lets us figure out what to do here. Well we have an uncertainty of A and B. Well that's just that formula. So we can do that separately. We need to know what then the uncertainty in mu is. So let's write that down. The uncertainty in the dipole moment mu. We're going to pick a relative one first because we're just going to copy this. And now we need to know what B is. Well B is the power. So B must be here. The power is half. Nice. And then what's the uncertainty in this number here? What's the uncertainty in A divided by B? Well it's the uncertainty, so A minus B, uncertainty in A minus B divided by whatever the value of A minus B is. Now you could, if you want, subtract, substitute A minus B for some other number. We could pick D. We haven't used that yet for instance. But I'm just going to leave it there because we know. And that is equal to that formula up there. And where do we get those uncertainties from? Well A and B here are actually these gradients and we get the gradient information from the line stats function in Excel. So now we've had a look at all of that. I'm going to implement this all in Excel right now. So let's go back here and let's have a look. So what I've got is my A and B. I've actually just labeled these already as A and B via the defined name function. So I'll use them in a moment. And we've propagated it through here. And I've also labeled this one as U of A and U of B again by right clicking going to define name and just typing it in there. So if I come over here, I can now begin figuring out what these are. And these are the values I need to know. I need to know what A minus B is. What is that difference in the gradients? So I'm going to start typing A minus B, about 20, about 24. So it's actually a relatively small number of relatively small change between the one graph and the other. But that's fine. And now uncertainty of A and B. Well, that's that Pythagoras like thing. So we need to take the errors of the two square them, add them together then square root. So what we're going to do that? Oh, we could do UB squared. But what I'm going to actually do is something called sum squared. Now this squares every individual number that you put into it and add them together. I'm going to put UB and then UA, doesn't matter the order. So I'm going to sum them all up and add them. Now, what's the advantage of sum squared? Well, if I wanted to do relative errors and use that other formula for, I could just type in B there or backslash A and return that and that would be a percentage error. If I did it with carrot symbols of trying to do UA divided by A and then squared, I need to remember to put a bracket around these because otherwise that is going to square the value of A and then divide by it. So it's going to do all of that first. With this formula, I don't really need to worry about brackets. I just need to worry about where the commas are. So it's a little bit of a shortcut and it simplifies things down a little bit. But that's not the end of the formula. I need to square root it. So that's SQRT. I'm just going to make sure I've wrapped it in brackets. If you see this next cell, if you close a bracket, the other one briefly flashes so you can keep track. I'm going to return that. So the uncertainty in that is 1.73. So my difference here is 23.9 plus or minus 1.73. But obviously the dipole moment error is not plus or minus 1.7 because the dipole is 10 to the minus 29. So clearly that's not that case. So I'm going to get the relative error of that by doing that divided by this and make sure it's in percentage. It's something I do by default. I'm dealing with relative errors as I just click the percentage icon to make sure it is percent. And then that's a very quick visual reminder that this is dimensionless and a relative unit. So I've copied the two numbers here in Coulomb meters and dipole and Dubai. I need to work out what is the uncertainty here. So let's go back to here. The relative uncertainty mu divided by mu is equal to a half times the relative uncertainty of that A and B. Well, this is what we've got already up here. So I need to do equals. I'm going to do it as 0.5. You can do it as 1 divided by 2 if you like as long as you wrap it in a bracket to make sure the order of operations is unambiguous. And I'm going to multiply that by that relative error. I've already got it there. I don't need to type it in anymore. There you go. There's a 4 percent. That's not bad at all. A 4 percent error in my value. So how do I get that back to Coulomb meters? Well, it's going to be that relative error multiplied by the original value. Let's kind of look at 0 percent there until I stick it into scientific. And then we've got 5.83 multiplied by 10 to the minus 31. So we could leave it there if we want. We can match the orders of magnitude as well. So for instance, if this one, let's get another, that will be like 1.61 plus or minus 0.05, then times 10 to the minus 29, for instance, actually 0.06. We could match the order of magnitude and do it that way, or we can put it into buy. And it's the exact same operation. We know it's 4 percent and it doesn't matter what the unit is when it's 4 percent. So we just need to do that number, multiply by our 4 percent. So 0.17. Let's put it back into numbers. 0.17 plus. Good. It's 0.2. So that is now basically 4.8 plus minus 0.2 to buy. The reason I'm not putting in the normal number is because I don't have my external keyboard. So I can't use the alt code. And going through and finding it to here is usually a bit of a pain. Do I have I used it recently? No, I haven't. So I can't be bothered to find the plus or minus symbol right now. But I would do that in Word later. So that is how we've propagated the error. And we've done it in Excel. So again, the main thing about doing it this way is if you change your raw data again, let's say that third point there looks awful, let's get rid of it. Suddenly, well, we need to move that up to make the line stats work again. But our error is now going to drop ever so slightly. And we can actually propagate that through to a much more finite error automatically without having to recalculate anything. Now we've dropped it to 0.05 just by getting rid of two extraneous points that we don't need. So that's really useful. Make sure you can set these up in Excel, because then you can update your data as you go.