Okay, welcome. It's good to be here. My presentation today is on Bayesian networks and specifically some tools for using them in Ruby. As a day job, I crimp cables, if you weren't here earlier, you would have seen me doing that. I also like to work with Ruby. First, I'd like to set the stage by talking about some of the problems they solve and how they work. Much early research in the field of artificial intelligence focused on expert systems and first-order logic. Although nowadays, they're much more sophisticated. Most of these fledgling systems attempted to solve problems by storing numerous facts about their area of expertise and deducing the answers using predicate logic. This is an example of a first-order logic or predicate logic. These sentences state, for all x, if x is a person, then x is mortal. Socrates is a person. Therefore, Socrates is mortal. As AI became commercialized in the early 80s, the sector initially had great success, but the so-called AI bubble burst towards the end of the decade as companies failed to deliver on their extravagant promises. Perhaps part of the appeal of this emphasis on logic was that it relied on things that computers were really good at, like storing a lot of information and quickly executing many operations. But it has some profound limitations. Consider, for example, this rule. For all patients p, if patient is experiencing a toothache, then p has the disease called cavity. The problem is that this rule is wrong. Not all patients with toothaches have cavities. You could try to fix this by changing the rule to accommodate for all possible causes of toothaches, such as gingivitis, abscess, maybe he got punched in the mouth or something. Unfortunately, the list of possible causes is pretty much unlimited. You could also try reversing the causal order to say that cavities cause toothaches, but this isn't true either because some cavities don't cause toothaches. The problem with logical agents are, it's beyond our capability to make a complete list of all possible antecedents and consequence needed to ensure an exceptionless rule. And it's too difficult to even use such a rule if we had one. Even in cases that aren't beyond our capability, there's a point of diminishing returns after which it's just not worth spending any more time on. In other words, just solving the problem isn't enough. We also have to solve it in a reasonable amount of time. And I would say probably the lifetime of the universe wouldn't be a reasonable amount of time. There are no useful areas of knowledge that have been completely mapped out by a grand unified theory of everything. In fact, Goodall's incompleteness theorem tells us that in any useful, consistent formal system, such as first order logic, there will always be statements that are neither provably true or provably false. In other words, any useful system can never be both complete and consistent. And even if it were possible to know all the rules, we might be uncertain about a particular situation because we don't have the time to run all the necessary tests or something like that. It's interesting to consider though that people deal with uncertainty all the time. Never being able to know anything with the likelihood of 100%, we are forced to take these leaps of faith every day. In fact, just getting out of bed in the morning requires us to make a number of assumptions. Whether we realize it or not, we employ these strategies in every decision we make. Our knowledge can at best provide only a degree of belief in the possible outcomes for a given decision. The main tool that experts use to quantify and express these degrees of belief is called probability theory. Stewart Russell and Peter Norvig in their monumental texts on artificial intelligence, which I'd highly recommend, they articulate this well. They say, probability provides a way of summarizing the uncertainty that comes from our laziness and ignorance. I probably wouldn't be inclined to be quite so hard on ourselves as to call it laziness since there are often good reasons that we don't or can't always obsessively optimize our decisions. But let's assume we're good Calvinists and we enjoy self-flagellation. Laziness it is. I hope you'll bear with me for just a minute while I take a few minutes to go over some of the basic concepts in probability theory that are used in Bayesian networks. I think it'll help lay a foundation for understanding them a little better. First, propositions are statements about degree of belief or assertions that such and such is the case. This proposition says that our level of belief that cavity is false is .9 or 90 percent. In this proposition cavity is called a random variable or some aspect of the problem space that can take on multiple states. Random variables can be boolean, meaning they can only be set to true or false. Discrete meaning they can take on many different distinct states and boolean random variables are a subset or a special case of this discrete random variable or continuous meaning they can take on any value from the real numbers. Each random variable has a number of different states that can take on. The list of all possible states for a random variable is called its domain. The domain of the variable cavity is true or true and false as you can see here. There are a few fundamental pillars or axioms of probability upon which everything else rests. First, every probability must be between zero something that is never true and one something that is always true. Second, which I basically just said is that anything that's always true has a probability one and anything that's always false has a probability of zero. And third, the probability that either one proposition or another is true is equal to the probability of the first plus the probability of the second minus the probability that they're both true together. So to understand this, you can think of it like this. We have one event. We add it to the probability of the other event to get the probability that either event happened. However, we've counted that intersection in between the two events. That is the times when they're both, when they both happen together twice. So we have to subtract the intersection once to get the right probability. We can also derive a few other truths from these axioms. Clearly, A or not A is a certain event. Either one or the other has to be true, but both can't be true. So a shorter way of saying this is that the events are mutually exclusive. From axiom two, which says that a certain event is equal to one, we learned that the probability of A or not A is equal to one. Since A and not A are mutually exclusive events, we can use axiom three without having to worry about the possibility that both A and not A might be true simultaneously. So we can reduce the axiom to just the probability of A plus the probability of not A is equal to the probability of A or not A, which we have just learned is equal to one. From this, we can also learn that subtracting any probability from one gives the inverse of that probability or the probability that the proposition is not true. Bear with me for a few more minutes, won't take too much longer on this probability stuff. The prior or unconditional probability of something is the degree of belief given to it in the absence of any other information or based on information that is outside the problem space. This proposition says that our prior belief about the likelihood of a cavity before we gain any other information is 10%. Notice that we can remove the cavity equals true and we just say cavity inside the parentheses and we're simply talking about when it's true. This raises the subject of an interesting sort of taste great less filling debate that's been going on for a long time among statisticians. Where do probabilities come from? The frequentist approach is to say that they come from experience about the world. That is, we count up all the times that we found something to be true and divide it by the total number of samples to get its probability. The Bayesian approach expands probability theory by allowing us to reason about beliefs under conditions of uncertainty. It recognizes that there are some outcomes we have never experienced that still have some probability. For example, what are the odds that Barack Obama will win the 2008 presidential election? We can express a belief about this event even though it has never happened before. Furthermore, even events that have occurred before may not have occurred frequently enough for us to accurately determine their real probability. For this reason, probabilities are usually expressed as degrees of belief with all of them being influenced by something called a subjective prior whose effect is diminished the more observations you make. Another interesting aside is that some cosmologists and philosophers have observed that the so-called laws of physics themselves are probabilistic and that such things as time and the speed of light are not actually constant throughout the universe. Pragmatist philosophers like William James and Charles Pierce believe that truth is what works and that physical laws are like well-worn pathways that only become so after a long Darwinian sifting process, similar to the notion of a subjective prior that gets modified as we gain more experience. Sometimes we want to talk about the probabilities of all possible values of variable and that's called a probability distribution. And this example above shows the prior probability distribution of the variable weather. So to shorten the notation, we can use a bold non italicized P to indicate that what follows will be a vector of probabilities for all the states of the given variable rather than a single probability. And sometimes we want to talk about the combined probabilities of all the variables in a system, a joint probability distribution that covers this complete set is called the full joint probability distribution. This is the full joint probability distribution of weather and cavity. The probability of each combination of states is on the rightmost column and I've also included the prior probability of each state next to its name and parentheses just so that you can compare them with the combined probability which is commonly known as the posterior or conditional probability which I'll explain in a minute. A typical full joint distribution will not list the priors next to each of those variables like I did. Notice that the sum of all the probabilities is one. In a logical world the sum of all possible atomic or mutually exclusive probabilities has to be one. Notice also that the probability of sunny and cavity occurring together plus the probability of sunny and not cavity occurring together is equal to the probability of sunny. Anytime this happens you know that the variables are independent of one another. In this case the behavior of the weather is not dependent on whether or not you have a cavity. The summing process I just showed you is called marginalization. Given the full joint probability distribution of a set of variables we can determine the probability of individual variables advanced by summing up all the cases where they hold. This process got its name from the way actuaries would write up the sums of observed frequencies in the margins of insurance tables. So in this case we could calculate the probability of whether equals sunny by summing up all the states of cavity where it holds. And when we calculate the probability of variable a by summing all the applicable probabilities of variable b like this we say that b is marginalized out of the probability of a and b. Here we have a generalized formula for the marginal probability of any probability distribution a from the joint probability distribution of a and b. As we saw on the table you just sum up the probability of a given each state of b and notice the vector notation refers to a whole distribution not individual probabilities. Another thing to mention is that the comma here is another way of just saying logical and. I should mention here though that the complexity of inference using the full joint distribution is exponential for both time and space. The probability table for a domain described by n boolean variables is on the order of two to the nth and the time it takes to process the table is the same and these bounds of course only get worse with multi-state discrete variables. And for these reasons it's just not practical to use the full joint probability distribution for inference but it helps us to understand understand some of the basic operations that we use in Bayesian networks. So once we've obtained some amount of evidence about a previously unknown random variable prior probabilities no longer apply. Instead we use a conditional or posterior probability. The notation for expressing a conditional probability is something bar or something else. So the way you read that is you say the probability of a given b. And you can also think of a prior probability as a special type of conditional where it's conditioned on no evidence. Conditional probabilities can be described in terms of unconditional probabilities and that's what this defining equation shows right here. The probability of a given b is equal to the probability of a and b together divided by the probability of b. And I just did a quick little example so you guys can get how this actually works. Let a denote the event that a puppy in a kennel is female. Let b denote the event that a puppy is a puppy is a labrador. In a kennel of 100 puppies suppose 40 are labradors and that 10 of them are females. That gives us the probability of a and b puppies who are both labradors and female as 10 over 100. The probability of b puppies who are labradors is 40 out of 100 and the probability of a given b is 10 over 40. That is 10 of the 40 labradors are female. So we can see that plugging all these things in gives us a valid equality. We can also derive something called the product rule from this equation. Now when I do equations I like to show every step because I'm not that good at math so anyway here it goes. You first multiply both sides by the probability of b then you cancel the terms then you flip the equality statement then you change the order of the multiples on the right hand side and you've got the product rule. You can think of this as saying that for a and b to be true we need b to be true but we also need a to be true given b. You can also turn it around and say that the probability of a and b is equal to the probability of b given a times the probability of a and we can put all of these things together to come up with something called Bayes rule. The equation for conditional probability and the product rule they can all be combined to do this and this simple equation is what underlies all modern AI systems for probabilistic inference. Bayes rule shows us how to update our belief about a hypothesis in light of new evidence. Our posterior belief or the probability of a given b is calculated by multiplying our prior belief by the likelihood that b will occur if a is true and we have the Reverend Thomas Bayes to thank for this equation. It was published posthumously in the papers of the British Royal Society way back in 1761 through the recommendation of a friend of Bayes who knew what a brilliant man he was and that his modesty had kept him from publishing much of his work. Not extremely well known in this time his work is now like the foundation of most probability theory. I should add that there are some anachronisms in this portrait that have cast doubt on its authenticity but I just couldn't resist throwing in a picture of some old guy even if this isn't really what Bayes looked like. The power of Bayes rule is that it is often difficult to directly compute the probability of a given b but we might have information about the probability of b given a. So it lets us compute a given b in terms of b given a. I'll show a quick example about how that might work. Suppose we're interested in diagnosing cancer patients who visit a chest clinic or I should say cancer in patients who visit a chest clinic and let a be the event that the person visiting the clinic actually has cancer. b is the event that a person visiting the clinic is a smoker and we know the prior probability of a from past data because we know that 10 percent of all the patients visiting the clinic end up having cancer. So we want to compute the probability of a given b that is we want to know if they do smoke how much more likely they are of getting cancer. It's hard to find this out directly but we know the probability of b because this information is also collected from incoming patients. So we're likely to know the probability of b given a by checking our records and determining the percentage of patients diagnosed with cancer who were also smokers. Suppose that this percentage was 80 percent. We can now use Bayes rule to compute the probability of a given b. So in light of the evidence that a patient is a smoker we revise our prior probability from point one to point one six. This is a significant increase but it also shows that the low overall probability of cancer has the greatest influence. Often the probability of b is thought of as a normalizing constant so we pull it out and we can actually discover the probability of b through marginalization. So we'll separate that from the rest of the inference process and do it at the end. So when we do that we have this general form of Bayes rule with normalization. And one more tool that we really need for Bayesian inference is the chain rule. So you'll recall that we derive the product rule from the formula for conditional probability. We can expand the product rule for more variables and like this and here we have the generic version for an arbitrary number of variables. This is called the chain rule and it's important for Bayesian networks because it allows us to calculate the full joint probability distribution of any domain of random variables by starting with something we know such as or something that doesn't have is not conditioned on anything else like the probability of a sub n and then using that to calculate the next probability and so on and so forth and then we can do the whole full joint probability distribution. But this rule doesn't help us to reduce the complexity of inference but it is a tool that we'll use that will combine with something called conditional independence. Earlier we talked about independence. A is independent of b if its posterior given b is the same as its prior. In other words b has no effect on the probability of a. Another very important concept for Bayesian networks is the notion of conditional independence. If the probability of a given b and c is the same as the probability of a given c then we say that a and b are conditionally independent given c and understanding this concept was a crucial step to the development of Bayesian network theory. Before they understood this concept they didn't know how to reduce the complexity of the operation and they didn't see any reason for pursuing it. To understand the conditional independence a little better let's just take a few examples. In our first example we'll say that Alice tosses one coin and Bob tosses another. So event a is the result of Alice's toss and b is the result of Bob's toss. It's pretty obvious that a and b are independent. The outcome of one is not going to affect the outcome of the other. Now let's suppose that Alice and Bob toss the same coin. Assume there is a possibility that the coin is biased towards one side. In this case a and b are not independent. Observing that b is heads or tails causes us to increase our belief that a's result will be the same because we have at least a teeny tiny prior belief that the coin could be biased. In this example variables a and b are both dependent on a separate variable c. The coin is biased event. Even though a and b are not independent it turns out that once we know the value of c any evidence about b can't change our belief about a. Specifically it says that the probability of a given c is equal to the probability of a given b and c. In this kind of a case we say that a and b are conditionally independent given c. In a lot of real life situations variables that seem to be independent are actually only independent conditional on some other variable. Let's suppose that Alice and Bob live on opposite sides of the city and come to work by completely different means. So Alice takes the train and Bob drives this car. A will represent the event that Alice comes to work late and b will be that Bob comes to work late. So it would be tempting to assume that a and b are totally independent. However even if Alice and Bob lived in some totally different countries there could be some factors that affect them that could cause them both to be affected by this such as an international fuel shortage or you know a nuclear holocaust or something like that. But when we're developing our model of probability or uncertainty we usually don't take crazy things like that into account. In this case for example we could say both a and b might be affected though by a train strike which we'll call c. And clearly the probability of a will increase if c is true. But the probability of b will also increase because of the extra traffic on the roads. So you thought that these things were independent before but you realized they might not be. But the key is that once we actually know the state of c the probability of a and b are independent of one another. It doesn't mean that knowing c doesn't affect your belief about a and b. It just means that once c is known knowing what a is won't change what b gets and vice versa. And this is an actual example of a Bayesian network. It's taken a long time to get there but sorry about that. A Bayesian network is a directed acyclic graph whose nodes represent random variables and whose edges represent influence or causality. Each node has a state table with a joint probability distribution of its own states and the states of its parents. Conditional independence means that the nodes only have to keep track of conditional probabilities for nodes that directly influence them. That is their immediate parents. This means that a Bayesian network is complete is a complete and non-redundant representation of the domain. It also means that a Bayesian network is much more compact than a full joint probability distribution. The full joint distribution for a Bayesian network can be generated using this formula that we have here where all you need to do is basically look at a node's states and the probability of a node given its parent states. On the left there you see a notation that represents a certain arrangement of variables in the network and on the right you have the way of calculating the probability for that arrangement. So this compactness is an example of a characteristic that's usually found in something called locally structured or sparse systems. So no matter how big the system gets, each component of the system only has to communicate with a few other components in the system. So it really reduces the complexity of the operations in that system. Local structure or sparse structure like that is usually associated with a linear growth curve rather than an exponential curve. With Bayesian networks it's reasonable to assume that in most domains each random variable is directly influenced by at most k others for some constant k. So if we assume that we have n Boolean variables just for simplicity sake, then the amount of information needed to specify each conditional probability table will be at most 2 to the k numbers and the complete network will be specifiable by just n times 2 to the k numbers. So in contrast the full joint probability distribution contains 2 to the n. And just to give you like a concrete example of how big of a difference this is. Suppose we have 30 nodes each with five parents so that would be k equals 5. The Bayesian network requires 960 numbers but the full joint distribution requires over a billion. And this compactness also makes it possible for Bayesian networks to handle complex domains with many variables. Let's look at a simple example of a Bayesian network. In this domain we have four variables. One cloudy is it cloudy outside. Two sprinkler where the sprinklers turned on. Three rain did it rain. Four is the grass wet. We can see that cloudy has no parents so for our purposes the things that influence cloudy or influence whether or not it's cloudy outside are outside of our problem space. We just have a prior belief on that. Cloudy has a prior probability of 0.5 or 50 percent. Half the time we expect it to be cloudy and the other half not. And sprinkler and rain are influenced by whether or not it's cloudy. For rain that's pretty obvious. If you have cloudy skies you increase the chances of rain. But they also increase the chances that the custodian will disable the sprinklers for the day so cloudy has an influence on sprinklers as well. The probability that sprinklers will be enabled given cloudy is 0.1. So the probability that they will be enabled given not cloudy is 0.5. And the probability that it will rain given cloudy is 0.8 and given not cloudy is 0.2. And whether or not the grass is wet is influenced by both the sprinklers and the rain. Since it has two parents grass wet has to have conditional probabilities for all the combination of its own states and its parents. If both the sprinklers and the rain are true then it's highly likely the grass will be wet 0.99% or 99%. And if one or the other are true then the probability is 0.9. Otherwise there's no chance that it'll be wet. So notice that the tables here show only the rows for each variable's true state to save space on this slide but internally the variables have to have the probabilities for the combination of all of their own states and those of the parents. So that would mean two for cloudy, four for sprinkler and rain, and eight for grass wet. Inference in Bayesian networks occurs by passing evidence about variable observations to the network and then querying the network for the posterior probabilities of unknown variables. So here let's query the network and say that we only know, we've only observed that grass, the grass is wet and we want to know what the probabilities of those other variables states are. So we can query the network for the posterior probabilities of the other ones. We can see that the probability of cloudy has increased slightly given the evidence and we can also see that the probability of sprinkler is a lot lower than that of rain because rain is a more likely explanation for the wetness than the sprinklers based on the conditional probability tables that we have there. Now let's see what we get when we observe that both the sprinklers were turned on and that the grass is wet. Now the fact that the sprinklers were turned on becomes the more likely explanation for the grass being wet and the probabilities of both cloudy and rain drop precipitously. By the way, you can also query a network with no explanation or no evidence and you can see the likelihood of those states just by their priors and their conditionals. So in Bayesian networks there's a few different ways that a lot of different algorithms that have been developed for doing inference on them and they use combinations of those formulas we looked at earlier such as marginalization, Bayes rule and the chain rule. The first type of or they generally fall into two categories. First you have exact inference and although most networks or a lot of networks have characteristics that allow them to be solved in polynomial time, the general problem of inference on Bayesian networks or exact inference anyway is NP-hard and for those of you who might be unfamiliar with complexity theory, this basically means that the time or space required to solve the problem grows exponentially with the problem size and you could potentially be waiting for something like the the lifetime of the universe for an algorithm to complete given a problem of sufficient size. But in practice the algorithms are good enough for fairly complex Bayesian networks to be dealt with efficiently on today's computers. Not always but a lot of the time. And then there's another general classification for inference methods which is approximate inference. And this is usually used this when you just want to do it faster or you don't need as quite as precise a results or just when your problem size is so big that it's impractical or intractable to solve the problem with exact inference. And most of these approximation algorithms use stochastic methods and Monte Carlo algorithms which bounce around the network and set the variables to different states randomly according to their probabilities. There are two main ways that learning takes place in Bayesian networks. First it's not always obvious what the actual structure of the network should be. Whether or not a variable has a causal influence or is actually a symptom of a more fundamental cause is often unclear as we talked about earlier. So computer scientists have developed a number of different algorithms for analyzing the level of apparent independence or causality between variables and suggesting possible relationships between the nodes. These algorithms take sample points. A sample point is like just a state for all the variables in the system. And then they take these sample points as input and they calculate each node's conditional probabilities. And they analyze these probabilities to see how they influence each other. Another essential task in learning in Bayesian networks is learning the actual parameters. This is just that you take sample points and you have each node build its state table based on all the frequencies of the various states that it sees. So we barely had time to scratch the surface of the underlying math involved in Bayesian networks and I hope I haven't scared you guys off too much with the details. But in practice they're actually pretty easy to work with. One of the great things about them is that you can just sort of let the data speak for itself. You might not even be aware of all the relationships in the domain but you if you let the network learn on sufficient data and it can render pretty amazing results. As a general rule as long as your network structure is kind of is reasonably accurate and you use all the available data during the learning process when you query your network you're getting close to the best possible predictions given the evidence data. This means you're nearly optimally leveraging all your knowledge of the domain. There's a few caveats there and sometimes when you when you really do well it might take a long time to do inference on the network but it can work very well. For the rest of the presentation I'd like to show you how to use a library that I've been working on that allows you to actually use Bayesian networks in Derubi applications. This library is called SBN or Simply or Simple Bayesian Networks. So this started out as a class project for class I took back it in the BYU computer science master's program on Bayesian methods and I got the pseudo code for the algorithms from artificial intelligence by Russell Norvig. It was written in Ruby but it was kind of sloppy and it was done on a short deadline and so it was kind of slow and inefficient. I later rewrote it in C++ and Ryan Davis he said he asked me why I decided to cross over to the dark side when I could have just used Ruby inline which if you're not familiar with that lets you write C code inside your Ruby app. I probably should have listened to him in retrospect but I thought it would be good to be able to share the code with a wider audience and I figured I could write a Ruby extension for it later but when I revised the code two years later I decided to just try starting from scratch again in Ruby and seeing where I could improve the efficiencies and the funny thing is the latest Ruby version which doesn't even use any C code yet ended up being faster than the C++ version. I don't know why probably that's saying more about my poor C++ skills than about Ruby's speed but I will say that Ruby's built-in methods for hashes and arrays have been pretty tightly optimized and I think a lot of the improvements this time around came because I tried to rely on those as often as it made sense. This experience also reminds us that premature optimization is the root of all evil as the famous Donald Knuth would say. First you should just code it in a simple and elegant way as possible then profile it and then optimize the areas that are most obviously bad or inefficient. By the way when I wrote the conference abstract for this talk I thought of titling the project SBN4R and basing it on the C++ library but I just decided to change it to SBN kind of out of respect for Sergio Espejas recent BN4R library which the name was just too close so and also to avoid the confusion. So let's look at how we would recreate the grass network with SBN. First we require the necessary files then we instantiate a new network giving it a title then we create each node in the network passing to them the network they belong to their names in the form of symbols strings will be automatically converted to symbols. The probabilities for their state tables and I'll tell you more about how to do that in the order to do those in in a second and then if you don't specify their states they just default to be in Boolean variables true and false. We then create the edges in the network by calling either add child or add parent. So adding a child also creates a parent relationship and vice versa so it really doesn't matter which of those methods you call. We then set the observed evidence in the form of a hash with symbols for keys and values so in in this case we the key represents the name of the node that you've observed and the value represents its state. In this case sprinkler has been observed as being false and rain has been observed as true and we then at the end I print the output from querying the network about the probabilities for grass wet. So let me just run this real fast and see how it works. You've got to have your your demo. I just got to do that. Kind of boring but we get back that it thinks that the grass the probability of grass being wet or not being wet is is about point one and the prop oh thank you. There we go. Let me run it again. Yay! All right so as you'll see right now at this point SBN uses an approximation algorithm and I haven't yet implemented exact inference. I hope to do that soon so it doesn't return exact results every time but the precise result that it would have returned if it were exact inference is point one for false and point nine for true but sometimes it's close enough for jazz and you're like oh that'll be good enough and the number of samples you take in your approximation algorithm will determine the accuracy of that result as well. So let me go back to presentation here. I always lose my mouth on those other monitors. Okay so the algorithm that it uses is called the Markov chain Monte Carlo algorithm. The order that the probabilities are supplied is as follows. You always alternate between the states of the variable whose probabilities are supplying. Supply the probabilities of these states for the the variables parents in the order that the parents were added from right to left with the right most or the most recently added parent alternating first. So I'll show you an example of how to do that. Let's say we have a variable a with two parents b and c. A has three states b has two and c has four. So I would supply the probabilities in the following order. First you go through a states for the first states of b and c and you have to remember that these tuples these little groups of states all each of them should add up to 1.0. Then you go through a states for the for b's first state and c's second state for c's third state c's fourth state and then all of a sudden you're now on b's second state and c's first state and so on and so forth until you got the whole thing. Entering probabilities you can also do them another way. This is possibly less confusing but it might be a little bit more verbose as you can specify an actual hash for the combination of states that the table entry belongs to and then just give it the probability for that combination of states. Parameter learning is another thing that the SBN does for you. Although it's sometimes useful to specify the probabilities in advance a lot of times we start with a clean slate and we're only able to make a reasonable estimate of the variables probabilities after we collect a lot of data. So this process is easy with SBN. You just pass in complete sample points for all the nodes in the network and as many of those as you want and then you just run the learn method on that. Another way you can do that is you can pass in one sample point at a time and then when you're done passing in all those sample points you call set probabilities from sample points and the networks will store the sample points that you pass into them so if you do add more sample points later it will keep the old ones that you've added so it continues to benefit from all the things you've given it. The library also supports serializing your network. Right now it uses the format called xml biff which is I guess kind of one of the few open source formats for Bayesian networks that was sort of proposed or promoted by the guy who wrote Java Bayes which is another cool little tool that you can download. So the networks that this library creates actually you can open them up in Java Bayes and mess around with them there too in a graphical way if you want. At present the sample points that you've given to your network aren't saved in the xml biff file but I hope to add that soon. There's also a few advanced variable types that make it a little bit easier for you to handle real world data and I'll talk about those right now. First there's something called a string variable and it's used for handling string data. So rather than set a string variable states manually you rely on the learning process and during learning you should pass the observed string for this variable for each sample point. Then each observed string is divided into a series of n grams or short character sequences that represent you know whether those were found in a given string. A new variable is created for each of these n grams whose state will be true or false depending on whether the snippet was observed or not in the evidence. And these co-variables are managed by the main string variable and they're transparent to you the developer. So they inherit the same parents and children as they're managing string variable and by dividing the observed string data into fine-grained substrings and determining the separate probabilities for each substring occurrence you can get a really extremely accurate understanding of the data. But I have to confess that the practicality of this feature is still kind of in doubt. It has the potential to greatly increase the accuracy of your inference but it often makes your network structure totally intractable, way more complex and impossible to infer on. So it was a good idea but it's kind of like those early attempts at flight you know that you see in those funny movies. But it might come in handy for some of you. I also created a variable type called numeric variable which you use for handling numeric data. Numeric data is continuous and so it's a little bit more difficult to categorize into discrete states. And the current inference algorithm that SBN uses actually can only work on discrete variables. So the the workaround for this is to use a process called discretization which kind of divides the numbers into buckets for each range of number. And the thresholds for these buckets are based on the mean and the standard deviation of the observed data that you've already passed to the network and they're recalculated every time you run learning on the network. So even though you're losing some amount of accuracy by discretizing your numbers at least the numeric variable makes it a little bit handier because it dynamically adapts to your number to your data and it also handles the discretization for you. And so as long as your data is somewhat normally distributed it should do all right for you. I wanted to end just by talking about a real world example you might use. Let's say I've got a budgeting pro I've written a budgeting program and I want to improve the accuracy of the expense tracking. So I'd like it to automatically categorize my transactions into budget categories with as little human intervention as possible. And I'd like it to keep learning as I categorize more things. So I could say that category is the variable that will query when we don't when we have a new transaction that we want to classify. We set the other variables down at the bottom there and we assume that the category is the main influence that will determine what they end up being. And we're not sure if the data such as the day of the week and the day of the month has a great influence on the category but there might be a trend in there that we're not aware of so we've got the data so why not just use it. And a string variable will be used to identify the merchant identifying string and the amount will be a numeric variable. I was hoping to have a demonstration of this to show you today but it's still not ready for prime time. I'm just not getting the results I would expect. I may need to use a different network structure. But anyway, hopefully I'll have more to show you soon. Some future improvements that I'd like to do with this library. I'd like to add exact inference, have real continuous variables and I'd also like to be able to serialize your sample data along with your network. And I'd just in general like to really speed things up.  You can really do some cool things. There's a library out there called Mac STL that I would recommend you take a look at that lets you just like use bunches of data in arrays and using just conventional math on arrays. You can under the scenes his STL library actually converts your code into code that's optimized for the multimedia instruction sets that are in today's processors. And those multimedia instruction sets let the processor like execute an instruction on say 10 or I mean 8 or like 16 or 32 variables at a time or 32 numbers at a time rather than one number at a time. So rather than iterating over all of your numbers that you have to process you can actually pass them in chunks. And this Mac STL library will abstract all that away from you. So all you do is convert your algorithms into array like notation and it just takes care of the rest and he shows how some algorithms have been sped up like 450 times by just using his library which is really cool. I'd also like to be able to learn the structure of the network. Right now you kind of have to specify the structure and have more control over like the precision of your of your inference when you're using the approximate inference. Finally I'd like to just talk about or thank some of the people who've got me interested in this subject. Some of my professors and also the cool tools that are available for the Mac for doing all those neat little graphs that you saw. That's it. Any questions? Right here. That's that's probably a good question. There are some Bayesian libraries that have been done for R already. I'm not a huge I'm not I've used R a few times but I'm not a big guru on R. But I bet I bet it would that would be a good idea to do this in that way as well. But hey I guess I guess yeah I guess you could do and connect R to Ruby that way so that's worth pursuing. Anything else? Thank you.


What's going on everyone? Sam here with Leighton Sports Cards, Rippin' 22, Penizena at the impeccable football hobby, 3 box mixer number 9, random team style, there's a look again at your random results. As always you can find these on the website under the results tab as well as the link in chat. Shad B, first break here at LSC. Got the Packers in the random, let's see some first break mojo hopefully. Good luck buddy. Here we go. Good luck everybody. It's one of Keegan B's friends. Join it up here. Appreciate your, hey Nicholas B's first break as well. Good luck Nicholas. See if we can get you some first break mojo too. Dude no way. Aloha again for the Cowboys. Wow Martin J. Congrats. It is Vaughn B's first break as well. Welcome Vaughn. We'll get that mag for you nice Trayvon. There's a rookie way of Matt Corral as well as a Alec Pierce. Rookie. Got a Carson once. Nice one here. It's going to be a Jalen Tolbert to 2.99. Two colored RPA. Oh wow. Okay. That is a combo spot. Going to Zach and how about Trevor Lawrence. 15 of 15. Boom. Let's go baby. Congrats Zach. Big box of Zenith again man. Nice second-year T-Law. Vaughn goes pain. Yes. Nice one there. Congrats Zach.  Vaughn at least you hit the couple other cards in the earlier breaks. Guys we're here. We've got that is Jersey numbered 12 of 25. Going to Chad. Congrats man. Aaron Rodgers on the epics. Nice Jersey numbered. First break mojo. We've got a Malik Willis 8 of 10 on the gold behind the numbers. Going to Keegan. There we go Keegan. Congrats man. Zenith is doing really well dude. Zenith is crushing it right now. As well as a Tyrion Davis Price rookie. You can go that in the recap. Yeah. Famous James. We've got a Desmond Ritter 102 out of 2.99 for the Falcons on the RPA. Congrats ATL and Fadarian Mathis. That is 15 out of 50 on the rookie auto for the commanders. All right. Impactable. Good luck guys. Last. Well we have impactable on the other break. So never mind. Is that every bucks man ever. Murray Cooper 12 of 25 and Juju to 75. We've got Van Jefferson 44 of 75. Combo spot going to the Rams. Andrew F on that one. Nice one there on the Van. Got going to the Ravens. That is Isaiah Lakeley 22 out of 75. That's the next one's sick. It's up Yogi. Yogi. How's it going dude? Nasty one here going to Andrew S. How about a Ronnie Locke 22 of 25 on the illustrious Inc. Nice one there on the on card. Going back to Zach. We've got Trayvon Walker 43 of 49. One off Jersey number. Rookie Auto. Rookie Landscape Auto. Followed by going to the Jets. That's going to be Garrett Wilson 8 of 35. Nice one there. And going to Keegan. Congrats Keegan. We got Elegance, Rookie Helmet and Glove Auto. Kenneth Walker. Nice one there buddy. Nice canine coming your way. Going to the Seahawks. Really good break overall I have to say dude. That crushed it right there. Nice one there. Congrats Keegan. I'm excited for Hitless Packs. We've got Malik Willis 2-10 on the gold behind the numbers for the Titans. Garrett Wilson Jets. Trayvon Walker Jags. Ronnie Locke for the Niners. We've got Isaiah Lakeley Ravens. Kenneth Walker Seahawks. Van Jefferson for the Rams. Baderian Mathis Commanders. Desmeritor Falcons. Jalen Tolbert Cowboys. We had a Trayvon Diggs Aloha for the Cowboys and then a Tremor Lawrence 15 of 15 second-year auto for the Jags. That'll do it for the break guys. Thanks again for the Fill. Next up we've got 10 Box Tuesday.


it's not greed that drives the world but envy. That's a quote from Warren Buffett. Envy, also known as jealousy, is a topic that's not really discussed in a lot of psychology books, as Charlie pointed out. He has three textbooks and not one of them goes into detail about the effects of envy on people. But before we discuss that, let's try figure out where this emotion came from. As we know it's in our blueprints, in our DNA. Envy is an emotion that we have been given in order to cultivate us to action. Think of back in primal days, if there was scarcity, lack of food amongst a tribe. Imagine seeing another man with food. Of course the feeling will be very beneficial here. You feel envious, you feel jealous. The reason we feel is so that we can change our situations. If we feel this uncomfortable emotion, we have an incentive to change our circumstances. We don't want to feel envious, so we're going to get what the other guy has. Now how you go about this might be different, but the end outcome is we will get what we have and ultimately this is good for survival. Now in the mundane, this emotion has been viewed as a negative emotion, but we have to understand that there is no negative or positive emotion. Everything is neutral. The negatives and positives are just labels that have been created by man. They do not describe the nature of the emotion. It's how you use it that actually ultimately determines whether it has been beneficial or counterproductive in your growth. You can use envy to grow. Imagine if you see someone with something you want, perhaps it's a new car, perhaps it's a new house, perhaps it's a leadership position or something, whatever it is, whatever you want. This feeling, you can use it to push you forward. Use it as motivation to get that which you are envious of. If you didn't have a feeling, you would not have the incentive to do what was necessary. See, you could tell that this is a very primal emotion because it's seen in children all across the world in sibling rivalry. Any of you guys that have had brother or sister would be aware of sibling rivalry. There is sort of a competition between children against each other, always to win the favor of the parents, whether it be in education or in sport. They're always trying to compete with each other. This is very healthy. Some of my libel are negative, but we already talked about labels. Ultimately, both the children are better off with this rivalry because it allows them to take their skills to places they've never been before or to reach new heights. Think of that next time you're envious.  Peace. Alright guys, if you haven't already, make sure you check out the new personal development global group on Facebook. Link is in the description.  This is pretty much the go-to place for your personal development articles, free content for everybody, and just the whole community that we're building up. There's no spam here. Also, you can check out the link to my website, The Realized Man, right at this website, and you can suss that out. If you have something in post, make sure you check it out and come on. Anyway, have fun guys. Peace.


QuickBooks Online. Reports Overview. Get ready to start moving on up with QuickBooks Online. We're going to be using the free QuickBooks Online Test Drive, searching in our online search engine for QuickBooks Online Test Drive. Selecting the option that has the Intuit.com in the URL. Intuit being the owner of QuickBooks. We'll select the United States version of the software and verify that we're not a robot. Zooming in by holding down control up on the scroll wheel currently at 1 to 5% on the zoom in. We note that in the cog dropdown, we're currently in the accountant view as opposed to the business view. We're going to be duplicating some tabs to put reports in by right-clicking on the tab up top to duplicate it and then right-click on the duplicated tab to duplicate it again. Right-click to the tab to the left as the tab to the right thinks reports on the left and we want the balance sheet. As that's thinking, I'm going to tab to the right, open up the reports again. This time we want the profit and loss, the P&L, the income statement. I'm going to close the hamburger, the hamburger, and then scroll up and change the range from 010122 tab, 123122 tab, run it to refresh it, and then tab to the left and close the hamburger, and then scroll up and ranging, changing from 010122 tab, 123122 tab, and run it to refresh it. That's the setup process that we have been doing every time. Support Accounting Instruction by clicking the link below giving you a free month membership to all of the content on our website broken out by category further broken out by course. Each course then organized in a logical, reasonable fashion making it much more easy to find what you need than can be done on a YouTube page. We also include added resources such as Excel practice problems, PDF files, and more like QuickBooks backup files when applicable. So once again, click the link below for a free month membership to our website and all the content on it. Back to the first tab. Note that in prior presentations, we've been looking at the setup or the forms by cycle, customer cycle, vendor cycle, employee cycle. Going to hit the plus button on the left hand side. Remember that the goal of the business is revenue generation. Our goal in the accounting department is number one to make a system. So the data input is as easy as possible to record financial transactions. Those financial transactions then being used to create the financial statements, balance sheet income statement and related reports. Our number two goal is to be able to facilitate those financial transactions and communicate them with the people we're doing business with like customers, vendors, and employees. Our focus now is on the creation of the financial statements. This is going to be the end result, the products of our data input into the system. That's what accounting is. We're entering past financial transaction data in order to construct, in essence, the financial statements noting that the major financial statements are the balance sheet and the income statements. So we spent a lot of time on the balance sheet income statement. More time just analyzing them and other reports in the future. But now let's just get a quick look at the other reports because they can be a little bit overwhelming. But if we see them in the light of their related to typically expanding on giving more information about some line item in the financial statement reports of the balance sheet and the income statement, then they don't become quite as overwhelming to think about. Also realize that some of the reports that are included in the reports center are really just reports that you can create and construct from a balance sheet and an income statement. They're variants of the balance sheet and the income statement. You might have a comparative balance sheet income statement. It's the same thing, but now you're just basically changing the comparative component to it, which you can construct from a standard balance sheet and income statement, which we will do in future presentations. So I'm going to do that by right-clicking the tab up top and duplicate the tab. And so we can look at some of these other reports and think of them in relation to the major financial statement reports of the balance sheet and the income statement. We're going to go to the reports on the left-hand side and I'm going to close the hamburger up top. Now in the reports area, you've got your standard reports. You've got your custom reports. These are reports that if we made changes to them, we can save those changes in a custom area. We'll talk about when that might be useful in future presentation. And then we've got the management reports. And these could be useful tools to format your reports, possibly for presentation to management. So you've got the company overview of the sales performance and expense performance. We might take a look at them in more detail, but they give you kind of a more nice or formal presentation look to the reports. Most of the time when we're working on the reports internally, we're going to be using the standard reports. Okay, so then up top, you've got your favorite reports. Now these are favorite reports because we've clicked the star. That's all it means. So if I had another report down here and I hit the star, it would come up to the favorite reports and moving it up top. So clearly any report that you use all the time, you're going to want to pull up here. You're pretty much everybody is going to have a star next to the balance sheet and the income statement typically because those are going to be your major financial statement reports. Then let's just go through the standard categories down below. I'm going to scroll in a little bit more here. So I'll scroll out so just enough so it has two columns. So we've got the business overview report. So first we've got the audit logs. So I'm going to right click on this and open in a new tab and just to check some of them out. And if I go into the new tab, a little think a bit. So now you've got your information about the users in the accounts of this. If you have multiple people that are using the system, you can kind of track the usage of them within it. So this isn't really related, of course, to the financial statements. It's going to be more of an internal kind of audit report log.  So I'm going to close that back out. And then we've got the balance sheet detail report. That's the one that we've been opening most of the time for the balance sheet. We've got the balance sheet summary. Notice it's just another balance sheet here, but oftentimes you might want to start. I'm going to right click on the summary and open it up with a summary report because it's going to be more simplified. So it looks like the balance sheet here except that we have basically the account types that we saw from the general ledger are now grouped together as one line item. And so it's similar to as if you took the balance sheet over here and you just collapsed all the arrows here. So again, you can kind of construct that from a standard balance sheet. This could be good for external reporting to start off with because you can start off with the balance sheet and then dive into more detail. Next we have some balance sheet reports. Notice that the standard balance sheet is here. The next one up top here is the balance sheet comparison. So if I right click and open that, this is just another kind of format of the balance sheet and you can actually create this from a balance sheet. We're now just comparing two periods of time. So once you start getting into comparative reports as we see when we construct these, you can start to get into a whole lot, a whole world of different reports just from a standard balance sheet as you compare month to month, quarter to quarter. This year to last year, this quarter to last quarter and so on and so forth. And you can also subtract the two of them to see the difference and the percentage change. So those variants become almost infinite in the number of reports you can get just from like a standard balance sheet layout. And then you've got the balance sheet detail, another kind of variant on the balance sheet. The summary, I'll just right click and open that one. Notice I'm right clicking and opening them up in a new window so I can come back to this window. So if I go back on over here, this is just basically a balance sheet that doesn't have the little drop downs, but instead just groups by account type. And that would be like taking this balance sheet over here and collapsing the triangles, for example. So again, you can kind of make this balance sheet from a standard balance sheet. It's a good starting point to lead people in and not overwhelm people with data and then start from there. And then you've got the business snapshot. If we right click and open the business snapshot. So it gives you some nice graphs and whatnot, some visuals to take a look at previous year income comparison. So it gives you some good information who owes me, who I owe in one window. Not the place I go most of the time, but because I would rather go to the reports themselves to find the detail. But sometimes if you get used to it, it might give you a nice quick look at things. And again, obviously it's a visual thing that could be nice to look at profit and loss as a percent of income. So now we're on income statement reports. Note that the major income statement report is just the profit and loss report right here, which you would think would normally have a star next to it. And then these are just variants, right? So now we've got profit and loss percentage of total income. This is a common way to present the profit and loss. If I look at that and close the hamburger. Now we've just got this percentage over here, this column. That's a common thing to add. We will show you how to do that, but notice it's just a variant on the normal income statement that we can build from a normal income statement. Another comparison, this would be similar to the balance sheet comparison, which we can build and will do so in future reports. So you don't want to be overwhelmed that there's a whole bunch of reports because these are basically just variants. Profit and loss detail, another variant of the profit and loss year to date comparison. So now we've got another basically comparative report profit and loss by customer. So now you've got the profit and loss report that's breaking out on a customer basis and then profit and loss by month. So another kind of variant of the profit and loss because now you're breaking that out on a month by month component. You can make that from a standard profit and loss profit loss by tag group. So these are those tags. So if I open that up, we've got the profit and loss by tag and that's a specialty. We don't have any tags right now, but if you're using tags, you can have a specialty kind of report that's being grouped by the tags. And then here's your standard profit and loss quarterly profit and loss summary. So another variant on the profit and loss and then the statement of cash flows. Now oftentimes people ask like why don't I emphasize the statement of cash flows as I do with the other major financial statement reports, balance sheet and income statement. And the reason is because the statement of cash flow, although important and a major financial statement report. It's really usually made. I'm going to make this from 010122 after you make the balance sheet and the income statement because the balance sheet and the income statement are going to be on whatever accounting basis you're using, whether that be tax or accrual or cash, but oftentimes there's a variant from just a strict cash flow. Even if you're on a cash basis, you have to change from a strict cash basis when buying like a building or something because you have to depreciate it, which is an accrual thing. So then you've got this other report that we can look at, which is just basically cash flows. So you can think of it kind of like it ties into the balance sheet, given you more detail on the balance sheet because the end of it, 4,063.52 should tie out to what's on the balance sheet. If I pull out the trustee calculator and we go boom calculator. And we got the cash here of 2001 plus the undeposited funds, which is also cash 2062.52, 4063.52, which is that number there. But that's not really the way you want to think of it. I mean, it's an expansion on cash and showing the cash flow, but it's really showing you the activity and the cash is the lifeblood of the company on more of a cash basis. So the first part is the operating activities, which are kind of like an income statement on a cash basis or it's taking net income and reconciling to net income on a cash based system. And then you've got investments, which is which is basically the cash flows for investments like stocks and bonds, but also equipment, property, plants and equipment and then financing activities like you putting money into the company stocks and whatnot. If it was a corporation and draws or dividends and whatnot here. So we'll talk more about the statement of cash flows. It is an important report, but when you're doing bookkeeping, it's not as important at all as the balance sheet and the income statement because those are the ones that are going to be primarily affected as you're doing the data input. And then the statement of cash flows is kind of constructed from that. And QuickBooks does a pretty good job of making one a default one that stays in balance and ties out. But it still might not be perfect, you know, and we'll talk more about it. The statement of cash flows constructing it can be a little bit a little bit tricky, but we'll close that out for now. So there's that one and I'm going to scroll back down. So then we got the who owes you money. So you would think this report would tie in mainly these reports would tie mainly into the balance sheet account of accounts receivable who owes you money accounts receivable. That's what the accounts receivable is gives us more detail on that. So if I go back on over, we're going to say, all right, then we've got the accounts receivable aging detail. So now we've got this aging report. And this gives us more detail on who owes us the money and get in a detailed fashion, but it also breaks out how old or outstanding the items are. The total here, if I changed the date range to December should match what's on on the balance sheet for AR. So it's given us more detail about a line item on the balance sheet, like most of the reports do. This is the accounts receivable aging summary. So similar layout of a report that you might be familiar with if you've worked with accounts receivable at all, where you've got the breakout of how old they are in summary and the customers and the total once again should tie out to what's on the balance sheet. Closing that out, we've got the collections report. So it gives us information on the cost. So again, similar to close to the AR, we've got the customer balance detail report. So this is going to be similar to these agents, but they're not going to give us the breakout of the agent. Just give us the information by customer. These two right here and then the summary is similar. These two right here are useful to know that the balance sheet account of accounts receivable breaks out by customer. That's what you want. But oftentimes in practice, if I go to the first tab, you'll find that information practically in the sales area and the customers. And the balances for open invoices are basically backing up and supporting your accounts receivable. So we'll talk more about that in the future, but they're just giving more detail on the major balance sheet account of accounts receivable. You got your invoice list. Now invoices are the items that increase accounts receivable. So if you're talking about open invoices, generally the open invoices that have not been paid, we haven't collected on them are going to be the balance and accounts receivable, giving more detail about the accounts receivable invoices and received payment. Again, this is a variant on accounts receivable because the invoices are the things that increase accounts receivable. Open invoices of report that's given us detail once again on accounts receivable in essence because invoices are what create the accounts receivable. You got the statement list showing the statements that have been sent out. So your statements, again, giving you information about stuff you're doing within basically the customer cycle. And then you've got your terms list, which is the terms like net 30 and net 10 and so on. So this is just a list of those terms. Not terribly useful most of the time because you basically be changing those lists up here in the information up top or as you do the data input. Unbilled charges, so unbilled charges are charges that you have taken place possibly that you've entered a bill or expense. And then when you are then going to create an invoice, you're going to pull that into the invoice. So this is given a list of those items that you have not yet billed, meaning you haven't created an invoice to the customer, but they're waiting. So next time you go into so for example, if I went to Amy's, Amy's bird, if I go invoice and say Amy's bird, some sanctuary, then I've got this item to pull over into it because it's waiting there because I already entered it. So we'll talk about billable billable items and entering time later. But that's what that report is doing. And do you want to leave? Yes. So that is that one closing that out. Unbilled time is a similar thing. We have time entered that we haven't created an invoice for. We haven't billed the customer. And then you've got sales and customers. Now the sales is an income line item in essence revenue. So you would think this would be giving you more information about revenue. Customers could have something to do with accounts receivable, but we're more focused on the income statement line item now. So we've got the customer contact list doesn't tie out directly to a financial statement report, but it's just giving us a list of our customers. And then you've got the deposit detail. Now the deposit detail if I open that up kind of ties out to the bank account, but it's kind of here because you would think that most of your deposits would be by the customers. Now this report, you can kind of create this report because it's basically giving you detail if I go to the first tab and I go into my checking account. And if I was trying to look at my increases to the checking account, I can try to customize this report and then filter it by transaction type and possibly pick up, say, the deposits. And I might have other things that increase it such as transfers or whatnot, but that's another way that we can kind of run reports related to the checking account, which is often something that we might end up needing to do because there's a lot of activity and different transactions going through it. I'm going to close that out. And we've got then the estimates and progress invoicing by customer. So this would more likely be used in a job cost type of system, which would be using the estimate forms and a progress invoicing system would be oftentimes like a percentage of completion type of business, which is more of a specialty area. You got estimates by customers. So that's going to be basically not impacting the financial statements, but tracking those estimates that are going to be like the initial touching point to possibly be picking up a job. And then you've got income by customer summary. So if I open that up, this gives us more detail on the profit and loss income line items. So income total comes out to 10,002. And so this one, if I change to date from 0101 to 02123122 and close the hamburger and run it. So now you've got your income by customer information, 968341. And you've got here 10. So sometimes it's not going to tie out because it doesn't tie out as nicely oftentimes as accounts receivable because sometimes you can post something to the income account and not assign a customer to it. So but if you if you use the same process of assigning a customer every time, it should tie out quite nicely. And that's one reason that we don't basically make income accounts by customer. I don't say this is my this is this is my Tom Jones revenue account, even though Tom pays most of our revenue or something like that because you want to just have the income account for what it is you do and be able to use these other reports. If you're in a full service accounting system to give the more detail about about breaking out your income by customer. It's a useful tool to note, but again, it differs depending on the kind of system you have. We'll talk more about it later inventory valuation detail. So this is your inventory report. It's giving you more information on the balance sheet account of inventory. So there's the overall inventory account. This gives you more information about it. And then you've got the inventory valuation summary. And then should tie out to the balance sheet account of inventory payment method lists. So this gives you a list of your payment methods, which is the populated on a form physical inventory worksheet. So this helps you to kind of track your inventory if you have inventory and do a physical count possibly with it. So it ties into the inventory once again, product and service list. So we talked about setting up our products and services. So this would be just simply a list of those products and services, the things that you would populate the sales forms with invoice sales receipts. You got the sales by customer detail. So this is similar to the other one we had over here, but this is sales by customer. We'll talk about the distinction between these two later income by customer and sales by customer. Because one of these, I think is taking on the income and expense side of things by customer. So if you're assigning some expenses to customer, I think the sales by customer detail is just taking on the revenue side of things is the distinguishing factor. We'll talk more about it later, but if I go into this one and I go from 010122 to 123122 and run it. Now you've got, I think this is just your revenue by customer and the total down here is at the 10, 2805. Does that tie out to our income statement? We've got the 10, it's a lot closer. Yeah. So this is our income side. The other report is trying to take the income and expenses. If you apply it expenses to a particular customer, I believe is the difference between the two. And then you got sales by customer summary, similar report giving us detail on the sales line item sales by customer type detail. So now if you have types of customers grouping the customers and types, then you have that sales by product service detail. So this is the other way we typically break out. Let's just do the summary. That'll give the details. Look at the summary that this is the other way we break out our income line because we don't typically want to put every item that we sell every piece of inventory. Every service that we do, we typically want to group them together. And then we would like to have another report breaking out our sales by item, by the things, goods and services that we sold. Again, this would only work if you are using a full accounting system, using items and using sales receipts and I'm sorry, using invoices and sales receipts. So from 010122 to 123122 and then we'll run it. And so that comes out down here to 10, 280, which is pretty close to our number here. It's not going to be exact if you don't use items, right? If you don't do the full service accounting system to report your income. If you're just using bank feeds, for example, to record your deposits coming through a deposit form doesn't have items. It doesn't use the same kind of customer detail to run the sub ledger reports. So you might change your system a bit. But if you're recording income with invoices and sales receipts, these are great sub reports to give you more detail on your income line item so that you don't record income accounts by customer or too many by item, right? Because you have these sub reports to do that. So then we got the time activities by customer details. And I've got the time by customer transaction list by customer. So this gives us your transactions by customer. And that that will anyways, we got the transit action list by tags. So once again, we have those tags that if you have the tags turned on, which is a specialty kind of thing, we might spend some time on that later. I'm kind of interested to dive into that. But in case of what you owe. So these are people that you owe. So if I go to the balance sheet, now we're mainly focusing you would think on the accounts payable. Now people that you owe money to this time. So back to the tab to the right. We've got the 1099s now 1099s or tax related item. So we'll dive into 1099s later. So they're they're a specialty area based on our tax obligations in the United States. So we have to report to the IRS if certain conditions are met that we paid money to these people so the IRS can follow up and collect from them. And then we've got the accounts payable aging detail. This is similar to the accounts receivable aging detail. So you'll see a similar layout. And so we have the aging this way because this is the detail broken out by vendor who we owe the money to. So it's just giving us more detail on that accounts payable. Same with this one. The bill payment list anything related to the bills and unpaid bills bills are the thing that increases the accounts payable. So this is a report giving us more detail in essence about accounts payable the outstanding balances. You got the vendor balance detail and the vendor balance summary. These also are similar to the the aging details and they're great because they give you a total. But oftentimes in practice you'll be working over here in the centers for the expenses center by vendor and going into the individual vendors and whatnot. This total outstanding balance area the amounts that are open should in essence tie out to the accounts payable. So we'll dive more into those later then you got the expenses and vendors. So when you're talking about expenses you're expanding on more information we would think from the income statement the profit and loss on the expense side of things. Note on the income statement the expenses are by category what we paid for what we bought. So we don't have the expenses by vendor who we bought from on the income statement. We don't typically put an expense saying this is Verizon. No we say telephone bill. And then so if we want to break out that more information we might have reports they can break it out by vendor. So we got the check detail. Now notice the check detail is giving us more information that is similar to what we might find and be able to construct on the balance sheet by going into the checking account and sorting for the decreases which would be customized. We can go filters and we can say transactions. And I want to look at the decreases which would be the payments the checks the there's kind of a lot of them because we have these different things that could be a decrease so it gets a little bit to possibly a transfer. I'm looking major principally for the expense form. And run that and so now we've got our decrease so you can kind of construct that detail from the checking account anytime you're looking at a report that's having in essence some kind of increase or decrease to the checking account. You can sort and filter to the actual checking account. And then I can go over here and then we've got the expense by vendor. So now we've got the expenses now by vendor. So breaking out that information instead of just by account you got the open purchase orders. These are not purchase orders you'll recall aren't actually forms that affect the financial statements. They are simply a request for inventory but we would like to track those open purchase orders. Oftentimes you might not do that in a report although it might be useful for external reporting purposes or to report to a supervisor. You would be going internal here going to the vendor area which is here and then possibly going to the expenses and sorting filtering by the purchase orders possibly is one way that you can do that and see whether they're open or closed and so on. So there's those we've got the purchase by product service detail. So if you purchased like inventory then you've got the items that you that you purchased. So now you can run your purchases by the inventory items. If you don't have inventory then that might not be as useful of report purchased by vendor details. So now we're making our purchases again by who we purchase from but given more detail transaction list by vendors. So now you've got your transactions by who we paid and then you got your vendor contact list. Next you've got your sales taxes. So in the United States we have our sales taxes. You got your sales tax liability report that clearly is giving more income detail about the balance sheet account of the liability of the sales tax accounts. And then you've got your sales tax detail your sales tax summary. Then you've got your employees reports the employee reports will only be there if you have the infant if you have payroll in essence and you're running the payroll through QuickBooks. Remember with the payroll you have some questions you really want to get sorted out before you start payroll being do I want to do payroll within QuickBooks or have a third party payroll provider to help do the payroll. I'm going to have to pay for payroll either way. And so although one might be more expensive than the other and so on and you do you want more control over less control. Can you depend on third party. And then and then if it's inside of QuickBooks that you're that you're running payroll then you may have a whole lot of other added reports that that are giving you more detail. Much of which is used to create the reporting forms that are necessary which are the paycheck stubs the 941s the 940s and so on all that kind of stuff which is over and above reporting that you need just to create the financial statements. So so you'll have a bunch of reports there. We'll probably go into those a little bit more when we do the practice problem and hopefully we can turn on payroll for free so that it doesn't add anybody added costs so that we can practice with payroll a little bit more. But payroll is a specialty in and of itself. So if you have a complex payroll situation we do have a payroll course we'd like to update at some point but it'll give you some detail about a little more about how payroll works. So then you got for my accountant. So this is like your accountant stuff they listed as you got account lists. So this is kind of your list of accounts which are the underlying baseline stuff that you need to create the financial statements kind of like the chart of accounts you've got your balance sheet comparison. Now I don't know why they put this one down here because they already had it up top. It's basically just a balance sheet report. So it's kind of funny and they got your balance sheet. Yeah we already saw that that's kind of up top. So I don't know why that's repeated down here really the general ledger is kind of like the transaction detail report. If I open that up that you would see if I go to my balance sheet and drill down into the checking account. This is your transaction detail but only for the checking account. If you look at the general ledger you typically think of it as you know like that transaction detail but it has all the accounts in it right and then possibly you can filter it from there. So by closing that one back out you've got your journal report. So this is a nice report. We'll talk more about it later that breaks out all the detail that you've been putting in by date but it gives you the actual journal entries even with a form. So you entered an invoice and it gives you the journal entry related to the invoice. So if you want to practice your debits and credits and try to understand what they're doing with regards to debits and credits which accounts are affected not in terms of just increases and decreases. But with debits and credits this is a useful form. It also might be useful to show your supervisor or your client if you're a bookkeeper the work that you did and you may be able to construct a billing process based on how many accounts were impacted. Right. So you can say hey look if I if I do work this month that has this many transactions or this many accounts impacted. I'll charge you this much versus so much if that if you're in another threshold which could be one way to kind of set your billing profit and loss comparison. We already saw that's a variant of profit and loss same with the profit loss here profit loss recent automatic automatic transactions. So if you have automatic transactions turned on then this will give you some detail about those recent transactions.  The main one you would think would be your bank reconciliation which is kind of a special report because it's more like an internal control report gives you more detail on the checking account. But it also like the double entry accounting system itself with its balancing mechanism gives you gives you an internal control more confidence about the whole accounting system altogether. So it's quite important we have a whole report on bank reconciliation. We got the reoccurring recurring template lists or a list of the templates statement of cash flows. We already saw that up top. It's down here to transaction detailed by account given your transactions by account transaction list by date. We're going to work on this one a couple times to it's kind of like the journal over here. But instead of having the debits and credits it's a little bit more streamlined. It tries to give you all your transactions in essence by date. But you don't but you have a split item but you don't have that all the accounts impacted. And if there's more than two accounts you get the split thing here. But this is another one that if you just want to count your transactions and possibly come up with a billing based on that then this could be useful. You can say hey look these are the transactions I did for you last month. I'm going to bill you if you're within this range maybe I bill you so much and so on but some transactions have more detail than others. That's why the journal report has you can try to count the actual accounts impacted or something and come up with a billing rate based on that maybe. Then you got your transaction list with splits. So this is nice because this is more like the journal report. You've got your transaction list but anytime you have those splits it's going to give you that more information. So this is another this is kind of nice. I haven't really used this one as much. It gives you it gives you the detail not in terms of a journal entry but increases and decreases but then it breaks out these longer transactions. So so we might dive into that one more in the future. And then you've got your good old trial balance. This is a quite useful report. It is in essence the balance sheet on top of the income statement and I'm going to 1231 222. And so when you're doing your journal your data input you might just want to open this report instead of the balance sheet and income statement. So that you can just have this one report that streamlined and you can check your data input and drill down on the accounts. So I highly recommend checking that out because it can save you time in terms of having multiple tabs open up top. So we'll start when we start to dig into our our practice problems. Sometimes I'll open the trial balance a lot of times at the end to kind of check our numbers and get used to it. So then we've got our more payroll reports down below which would be applicable if payroll was on. So the general idea every time you do a data input you're thinking what's the impact balance sheet income statement your major financial transactions and all the other reports that can be quite overwhelming are really oftentimes most of them giving more information about one or multiple line items or possibly are simply some variant upon the balance sheet and the income statement. So don't let those all those variations overwhelm you because because you know the balance sheet and the income statement are the major reports and then everything else kind of fits in somewhere to them in some cases. If you think about it that way it doesn't get quite as overwhelming hopefully. And so we'll go into more some of the major reports in future presentations.