What is going on everybody? It's Stas here. Welcome back to another video. So in this video, we're going to be doing an overall market update looking at the Dow Jones, the S&P 500, and the Nasdaq. We're going to be talking about two trades that I made today on the 21st of March in 2019, as well as taking a look at some other stocks and ETFs that did very well today. And believe me, guys, there were a ton, a ton of stocks and ETFs that did very well today. And we're also going to be talking about what I'm looking to trade here over these next couple of days. But before we do get into that, for everybody out there that finds value in these videos, you enjoy the content here on YouTube, feel free to go down below and hit that like button, guys. And I want to challenge you in this video, we have not done a challenge in a couple of weeks here. Can you get this video to 75 likes? Let's see if we can get 75 likes on this video. So go down, hit that like button. It's greatly, greatly appreciated. And if you're new to the channel, we have two links down below, one being the Discord group chat and the other one being the Facebook group. Both of those 100% free communities. And I guarantee you, you'll find a ton of value in there. There's a bunch of traders. I believe the Discord group chat now has about 600 to 700 traders and investors. We're chatting all day. I'm in there all day.  So get in there, you'll find a ton of value. So without further ado, let's talk about what ended up happening today. And you can see the smile on my face, guys. It was a crazy day today. A lot of my positions did insanely well. Two of my swing trades, they did perfect. And the other long term positions, some long term positions we're going to be talking about in this video did absolutely crazy as well today. But before we do get into that, let's talk about what ended up happening in the overall markets here, starting off with the SPX, the S&P 500. So we can see, ended up closing off the day today, up $30.65, up about 1.1% at the close. The Dow Jones industrial average, up 215 points on the day, up about 0.85% at the close. And the NASDAQ composite guys blew it out of the water today, up 1.5% on the day, up 115 points at the close. So absolutely crazy day today, guys, in the overall markets. And we all know yesterday, the Federal Reserve actually came out and said that they're not looking to increase interest rates here in 2019 anymore, although the economic growth of the company, not the company, the country, the economy, the forecast was dropped a little bit. The optimism from that rate hike really being halted for the rest of the year from what Powell said, I think that pumped a lot of optimism into the markets today, thus seeing this huge, huge push, right? So let's just talk about some technicals here very quickly in the overall markets and then we'll hop into the stocks that I traded and that did very well today. So the SPX guys, we've been talking about this 2820 level, this old resistance, which is now a new support. We were hovering above this for the past couple of trading days. And if I zoom into the five day five minute, we can see exactly what I'm seeing here. So on the 15th of March, we broke out of that resistance, making it a new support. And then we've tested that level multiple times, whether it was 2820, 2825, that general area of support was tested on many separate occasions. Once here, on the 15th of March, here on the 18th of March, here on the 19th of March, yesterday, we dipped a little bit below it, but ultimately popped back above it. Once the Fed started at 2pm Eastern Standard Time. And today, we ended up pulling back down at the market open, we can see we ended up going down to about 2820. And then we launched off there like a rocket guys confirming that fourth or fifth bounce there on the support. And now we're clearly on top of that support, obviously, and we're headed up to the next resistance, which we all know at this point, we've been talking about it is at about 2870 here for the S&P 500. So we saw the pullback guys, that was a little retracement. Honestly, that was a very small retracement. It brought the RSI down a bit.  Now we're looking to test the 2870 level tomorrow. So for tomorrow, that's exactly what I'm waiting for, guys, right, we can see we bounced on the support on the 50SMA like I just showed you guys the support here. And now we're going to be waiting to see are we going to break out of 2870 to then test the next level, which in this case is going to be at about 2885, 2890, or are we just going to pull back tomorrow consolidate at this level that we are at right now before possibly testing to break that 2870 level. And let's say we do break that 2870 level, I'm going to be waiting to see if the SPX is going to hold that level as a new support before advancing up to the 2890 level, which is going to be the next resistance. And it's crazy to think here, guys, how close we are now to all time highs.  We saw it all over the news. We saw a bunch of people just out there in the community in general saying this. And to be honest, guys, it's looking like we are almost going to be at those all time highs proving all those naysayers wrong. And honestly, I was pretty bearish as well, you know, a couple of weeks ago, a couple of months ago. And now, you know, we could potentially hit all time highs. My bearish thesis from a couple of weeks ago has proven to be a little bit wrong. But hey, we could still potentially sell off drastically here in a couple of months. No one knows. But as of right now, based on these technicals, you know, we're testing those all time highs here very, very soon. We're only 2.5% away in terms of the S&P 500, which is crazy, right? Because back in December, guys, we were down nearly 20, 21% from that peak, which is where we ended up tipping our toes into that bear market that we all know, right? So let's take a look at the Dow Jones industrial average here. This one ended up doing very well today as well, up 216 points at the close. And it's confirmed now that we broke out of that resistance at about 25,800, where we ended up closing below it yesterday, making it a resistance at yesterday's close. And now that we broke above it, it is safe to say that this is a new support level again, and we're trading in between 25,800 and the 26,200 resistance level here in terms of the Dow Jones. So what am I seeing here on this 20-day 1-hour chart? This little pullback seems to be, you know, the retracement that we were waiting for and the fact that we held a higher or low from the previous just goes to show now, in my personal opinion, what I'm seeing here through these technicals, that we're continuing the uptrend and we're looking to test the next high, which is going to be at around $26,100, which is the level that I'm going to be waiting for tomorrow, guys. And if we end up breaking that level, that's going to be the higher high that we want to see on a smaller-term basis here in the Dow Jones for it to continue the uptrend. And of course, from that level, we're going to be waiting to see if it's going to break this resistance at about $26,200. Those are some levels that, if we do end up breaking, we're going to be close to ending up testing those all-time highs even in the Dow Jones, right? So there's two resistances that we need to break here before we can get to that all-time high level here. Well, actually, I guess you can say three, right? We can see one at about $26,400 here. And from there, we're going to need to test about $26,700. So I guess you can say there's about four more resistances in the Dow before we can end up testing the all-time highs nearly at $27,000. So we have to break this level here. We have to break $26,200, $26,400, and then $26,800. And in terms of percent, we saw the S&Ps about 2.5% off. This one's about 3.5% off, so about 1% more away from all-time highs than the S&P 500 is. And this is mostly because Boeing stock, we know that Boeing stock took that huge hit, about 10%, 15% drop in that stock. And that is a heavy-weighted stock in the Dow 30. And that is really holding the Dow down in my personal opinion. Let's say that issue with Boeing never happened. I think the Dow Jones at this point probably would be up here on a $26,400 level. I think it would be up at least 200, 300 more points from where it currently is. Now, if Boeing was still in the $400 to $420 level, who knows, guys? That's just what I personally think here. So the Dow Jones, those are the levels that I'm watching for tomorrow. Just keep an eye. Are we going to break those resistances and continue this upwards swing, this upwards push here? So the NASDAQ today, like I showed you guys, and it's continuing to run here, had the best day out of the three major indices. So we can see we've been breaking out of resistances like crazy lately. We've bounced on the support here on the 180 SMA about two weeks ago at this point. And from there, we broke out of the 50 SMA resistance. We broke the $7100 resistance, the $7200 resistance. We broke out of the $73,500 resistance. And today, we finally broke out of the $7,420 resistance. So remember in yesterday's video, we were trading between the support at around $73,70 and the resistance at about $74,20. We were stuck in those levels for a couple of days here. We can see on the five-day-five minute, we were stuck there from about, let's say, the 18th, 19th of March up until today, when we rocketed out of that $74,20 level, breaking that resistance, making it a new support, and getting past the second resistance at about $74,90, which was from a couple of months back. And we can see that here. This was the second level that I was waiting to see a break, and we saw that break today. And this was a support back in September of 2018, guys. So the fact that we're already at levels from back in December in the NASDAQ is absolutely insane to me, guys. This has made the craziest comeback. And now, we're only about one, let's see, about 2.5% off of all-time highs here in terms of the NASDAQ. So 2.5% away in the NASDAQ, 2.5% away in the S&P, and the Dow is about 3.5% away. So it's safe to say at this point, guys, let's say we have another two, three strong green days over the next one to two weeks with maybe a pullback or two in there, and we have mostly green. We're going to be at those all-time high levels. We're going to potentially be breaking those all-time high levels, making new all-time highs in the overall stock market, which is absolutely unbelievable, right? This bull run is still 100% intact, guys, and the fact that we've been breaking these resistances back to back to back over the past couple of months, really all of 2019. It's just a crazy thing to see, guys, the power of the stock market. Sure. You know, a lot of people might think this is manipulated. Who knows? It may be manipulated, guys. There's a bunch of theories out there, but that's not the focus of this video. You're free to do your own research and formulate your opinion about that. Who knows? It could be manipulated. Maybe it's not manipulated. There's a lot, a lot of theories out there, but we just take it for what it is. The market is almost at all-time highs right now, which is absolutely crazy. Let's get into the two stocks I ended up selling out of today, and those were NVIDIA and ATV, guys. We saw the two swing trades that I took a couple of days ago, yesterday for NVIDIA and I believe two or three days ago for ATV. Both of those stocks did absolutely amazing today. Let's just talk about NVIDIA first. NVIDIA is the chip company. This one literally hit my target, nearly hit my target. I sold a little bit before just to play it safe in the matter of one day. Absolutely crazy. For those of you guys that watched yesterday's video, I actually got into NVIDIA at about $174 on the pullback that we saw leading up to the Fed meeting. If we can see here on the 5-day-5-minute, we can see what I'm talking about. We opened up yesterday at about $175, or rather we popped up to $179. Then we pulled down all the way to $172.88 right before the Fed meeting. I ended up taking a position right around here at about $174. I told you guys over the past couple of videos that I was planning on getting into NVIDIA with the goal to sell at the next resistance, which was roughly at about $185, which would offer from this point where I got in upwards of 7% profit. Guys, we saw it ran all the way to my target in one day, and I actually ended up getting out roughly at about $183-ish today. It was roughly at about, I think it was like 2.50 PM Eastern Standard is when I ended up getting out. Roughly around here, I think it was 2.50, so I ended up getting out, I believe, at about $183, and we can see from 174-ish where I ended up getting in, up to 183, roughly 183.70 was about a 5.3% move, nearly a 6% move in the matter of a day. So why did I end up selling here? Why did I not hold this overnight? Well, I just wanted to lock in my profits, guys, to be completely honest with you guys, and look for a potential re-entry. At this point, I'm already up 6% nearly overnight, and this overnight swing trade, the stock market in general, shot up like crazy, especially in NVIDIA. So I figured it's safe here to lock in those profits, not be too greedy, not hope that it's going to run up more, break the resistance tomorrow and the next day, continue to run up, but just to play it safe, right? I just wanted to lock it in. You know I'm more of a conservative trader on my day trades, I'm taking 1% to 2%. So 6% overnight, I am ecstatic with that. And now I'm just looking for a re-entry here in terms of NVIDIA. So we see it's overbought, you know, that's probably one of the main, or it is rather the main reason, one of the main reasons why I ended up selling along with it reaching their resistance. So now tomorrow, I want to see are we going to end up pulling back a bit to maintain the level at about 182, maybe 180 flat, that would be an ideal point for re-entry. And let me show you guys here. So the resistance, previous resistance was at about 178, 179. So honestly, that would be the best spot for me to re-enter roughly 178, 179. But that is asking a bit of a pullback there to get the re-entry. Sure, we might not get that. But if we get to 181, 180, depending on what the technicals are looking like, I might end up building another position there. And let's say tomorrow, we burst through this resistance, we end up getting up into the 186s at 185s, 187 ish levels, you know, and we end up holding this level as a new support, maybe for a day or two. That could be a potential re-entry there up to the next resistance, which in this case, I'm looking to see. I guess you can say it's roughly at about $200 to $205. So let's say we pump up here tomorrow, hold this level. The next gap I'm looking to fill would be up to about $200 to $205 from there, which is about a 7% to 8% move in Nvidia. But for now, I'm just super ecstatic with that overnight swing trade in Nvidia. And the second one that I ended up taking my profits on, literally 20, 30 minutes ago, right towards the end of the market, at about $48.80 was at the Activision Blizzard. And this one ran up like crazy. Another one that I was expecting to hold for a couple of weeks here, but I just wanted to lock in the profits that I did have. So sometimes, you know, I deviate away from my plan, if the stock does shoot up like crazy in the short term, just to lock in those profits and look for a re-entering, like a re-entry, right? I think it's very wise to do that sometimes, especially for someone like me who's a bit more conservative. Sure, if you're very, very risk adverse, you can hold here and hope to run up to the next resistance. You know, that could be something you can do. But for me, again, I locked in the profits. Let me show you guys exactly where I ended up doing that today. So we got in, I believe, was it the 18th? No, it was not the 18th. It was on this day, I believe I got in very close to the morning at about $45.66. That was the position I ended up taking.  I was up quite a bit that day. We ended up consolidating for the next day, which was very nice. We pulled back, held that new support at about $45.80 here. We ended up popping all the way up today to $48.83. And let me show you guys that move, literally near a 6% move in the matter of a day. And my initial goal here with ATV was to get in on the break above this resistance as a new support, which I kind of jumped the gun a bit because we didn't really confirm it as a new support when I did end up getting in. But that's okay. Sometimes I do do that, which is why I scale into my positions. And the goal was to ride it up to the first target, which was at this resistance, right, about $48 to $49. And we can see we clearly ended up doing that here today. And we can see, you know, I ended up taking my profits here at about $48.80 right at the top here. I held it throughout the entire day due to it showing really no signs of a big pullback. Sometimes when a stock runs the entire day, or rather, it's looking like it's going to run for the entire day midday, you sometimes see something like this, right, when people start to sell off. But the fact that we bounced here, formed this cut pattern and ended up breaking out of this resistance at about $48.30 from a couple of hours ago, that gave me the go-to to continue to hold this. And honestly, I had a trailing stop on it. But I just wanted to lock in the profits right around here. So now what I'm looking to do, very similar to Nvidia, guys, I want to get in on a reentry if we hold this $48 level as a new support, which I think is very possible. And from there, I would love to reenter and ride it back up to $51.51.50, which is the next resistance offering about a 7% margin of profit. So that is what I did today in terms of at the Nvidia. This is probably one of my best days, excuse me, here over the past couple of weeks. Simply trading, I made 6% on two different positions here, which was absolutely crazy. And now let's just talk about some other stocks that did very well today that I also happened to own. Let's start off here with Apple ticker symbol, AAPL. This one went off the wire today, guys. It went absolutely bananas. It went up $7 at one point, I believe. It was up $8, $9 per share today, crazy. It was up like 4%, 5% at its highest. And we filled up from the resistance, or rather the support at $185. We filled the gap all the way to $195 now. So we're going to draw out a new resistance here, which is going to be at about $200. If we successfully hold this resistance, new support here at $195, and we filled it to $100, that's going to be another 2%, 3% move in terms of Apple stock. And I told the group today, and a lot of the group already know, knew this, that I was buying Apple all throughout this dip. I believe the lowest price point where I bought Apple was at about $144. And those shares, guys, they're up over 20% right now, which goes to show the power of cost averaging, right? My average price was brought down in terms of Apple. I bought more Apple, bringing my cost average down in hopes of the stock going up, appreciating so I can make more on those shares that I bought at a lower price. And that's exactly what ended up happening here, guys, right? We ended up getting in all the way down to $144. And now the shares that I bought down here, they've appreciated more than 20%, which is really awesome, guys, really, really awesome. So Apple, that's one that did very well today. But the one that I'm even more happy about, which is my MU position, MU is one of my longer term positions here. And MU, you guys that have been following the channel for a while now, you know that I've been battered down on MU stock, I got in back all the way back a couple of months ago, at about $58, I believe my average cost right now is like $55 or something like that. The stock has been getting pummeled. This was one of my bigger red positions out there. And the fact that we pushed up 10% today up into the $44, the mid $40 range has been awesome for MU, guys. I'm really, really happy about this. And they actually beat on earnings per share and revenue, but their guidance is a bit lower. But this is not an MU video. We're not going to go too deep into their earnings report. But if you guys want to take a look at that, go do your research on that, especially if you're an MU shareholder. And another interesting thing about MU here is we called it out this morning. We talked about how this one could be a potential runner. I talked about it in my morning video because we saw, A, the earnings report beats the EPS and the revenue beats. And we saw a couple of analysts here upgrade the price on the stock. Let's see if we can see it. Here we go. Price target raised to $64 per share from $55 per share at JP Morgan, which is really, really big. This one is raised to $49 per share from $45 from key bank capital. And typically, guys, when investors see, traders see news like this, this could be a catalyst and a stock doing very well. And the other catalyst, which we talked about, the EPS and revenue being a beat, those two catalysts combined, that could end up running up a stock's price. And we saw that today with MU, up 10% at the close, absolutely crazy. So another stock that did very well today, guys, is Microsoft. Microsoft ended up hitting all-time highs again today, up to $120 per share, $120.82 to be exact, up 2.3% on the day here. Absolutely crazy. We saw Facebook, actually, they ended up doing very well today as well. We saw the dip. I actually didn't end up buying into the dip like I did talk about earlier on in this video. We kind of did predict it perfectly in the morning video today. I was talking about how I wanted to see a little pullback to the 163 level for Facebook before it's continuing to push up. We ended up getting exactly that, but I just did not enter into the position because I was focused on NVIDIA, ATV, I was already doing very well on those. And I didn't want to force anything, but it's pretty cool seeing that Facebook now. After that bad news, it's looking like it is filling the gap back up slowly, but surely, to $170. And this is definitely one that I'm watching for tomorrow, ticker symbol FB. So Facebook, Facebook, ATV and NVIDIA are three that I'm watching for tomorrow. I'm looking for a reentry into ATV, looking for a reentry into NVIDIA. So let's see a couple of more here. I had some on the top of my head, but I'm forgetting right now. Let's see. ATV, we talked about ATV. CGC, let's see how ACB did today because ACB was one and we did get more of that pullback that I was talking about earlier on today and yesterday. So this is one that I'm still actively watching heavily for a pullback down to about 929.30. I think that would be a very, very solid entry point in terms of ACB. So I'm watching that one very closely here today and heading into tomorrow. Let's see how UWT and Crude Oil ended up doing. This is the inverse ETF combo that I trade all the time here on the channel. It's Crude Oil, which has two leverage GTS, UWT and DWT. And we briefly saw a pullback this morning on Crude Oil, followed by a nice spike. And now we're pulling back again, holding roughly that support from this morning at around 5980 to 5990. So Crude Oil, I think right now, could open up an interesting play for tomorrow, but we are near that resistance, which kind of gives me a little bit of concern here. Are we going to end up pulling back a bit more here to test the 50 SMA support again? Are we going to run up to $61 tomorrow before we do see the pullback? These are a couple of things that I am watching in terms of Crude Oil here. So UWT, definitely on the radar for tomorrow. Let's take a look at Tesla today, guys, because Tesla, it's looking like it's continuing to confirm the support on the downwards wedge that it is on, this downwards channel pattern that it is on here. So I want to see, are we going to break ultimately $280 to break above that 50 SMA resistance from there? We could potentially see a runner up to the 290 level, maybe the mid-290 level, back up towards the resistance portion of this little wedge slash channel that we are seeing here. So Tesla, definitely one that's worth watching. And let's say tomorrow the markets, they don't end up pushing up. Let's say the SPX does not end up pushing out of that 2870 resistance. Let's say tomorrow, since we had a green day today, a very strong green day at that, let's say the SPX ends up pulling back tomorrow, we can end up playing TVIX, which has been getting battered here over the past couple of weeks, and TVIX is a market ETF that goes up whenever the markets are selling off. So if we see an aggressive red day here over the next couple of days, maybe even tomorrow after we had this big green day today, TVIX could end up seeing a nice run to the upside. So those are a couple of ETFs and stocks that I'm watching. I hope you guys enjoyed this video. I'm sure a lot of you guys made some good money today, especially if you're invested in some long-term companies. A lot of the large caps did very, very well today. Let me know down below how you guys ended up doing today. If you enjoyed this video, feel free to hit that like button, drop a comment down below, subscribe to the channel if you're new. I'll catch you all in the next video. Thank you all so much for watching. Peace out.


Hello everyone, welcome to the session of Logistic Regression. In the previous session, we discussed the introduction to machine learning. Today, as a part of predictive analytics or machine learning say, we will elaborate the details of logistic regression. In logistic regression, we will understand the basic concept and then the steps of logistic regression method and how it is been implemented. Using excel illustration also, we will conclude the session of logistic regression. So, this is the overall plan of today's session on logistic regression. Remember, in business forecasting, so far we have discussed so many models. We have discussed the regression analysis also, but whether it is a single linear regression or multiple regression. But in that case, when we use regression, the concept of regression was the basic regression was you have independent variable, you have dependent variable and you take in, try to find the causal relationship or linear relationship between the independent variable and dependent variable. How the dependent variable is been explained by independent variable? The direct linear relationship we calculate in regression, basic regression. I will show you today also the fundamental difference between linear regression and the logistic regression. But in logistic regression, when it comes to the basic understanding of the definition of logistic regression, here it is also another statistical method or say machine learning approach. But here, your dependent variables will not consider the continuous value. Your dependent variable like y will be called as a predicted variable. That predicted variable will be dependent on the predictor variables, which are nothing but the independent variables. But the outcome of your model, logistic regression model will be dichotomous. It will be like 0 and 1, like yes or yes or no kind of thing. It will not consider the actual value of y. This is the fundamental difference between the logistic regression and the linear regression. Here, we actually call the entire process of logistic regression method as a one of the classification method. So, let us understand how this model work. Here, you can see logistic regression is a statistical method used for predicting the probability of an outcome based on one or more predictor variables like independent variables. So, here we do not calculate the value of y, like say here we calculate the probability of the outcome. For example, therefore, we call it as a classification method. Categorical outcome will be considered, the outcome variables will be categorical. And variable generally, that is called categorical variable, which we will need to calculate through this method of logistic regression. For example, we can think about, suppose in stock market, whether to buy a stock or sell a stock or hold a stock, the decision outcome could be yes or no kind of thing. You might say, sir, then how come the probability are coming? I will explain that. There are many examples of logistic regression. In the banking sector, you will have to give a loan, whether the bank would like to approve the loan to a client or not. What are the independent variable or predictor variables? The independent predictor variables could be say, the income of the person, it could be the asset, the debt, all these things, credit score. Based on that, the bank will decide whether to approve the loan or not. So, the outcome, the decision, how much amount of loan they are predicting or they are approving, that is not the issue here. The concept here is that, whether to approve the loan or not, that is called the logistic regression. That we are left to find. But that, whether to approve the loan or not, like yes or no, that we need to find, like 1 or 0 say, that you need to calculate through logistic regression. But how we will calculate? Through the probability outcome, through a function called the same void function and through that, you will calculate the probability first and then that will convert into a categorical outcome, 0 and 1. There are many applications like customer churn predictions. Predicting if a customer, whether the customer will likely leave the store or not or leave the service or not, that can also be calculated through this logistic regression, like you might have the buying pattern, different type of product they are buying. So, all this past data you have, the consumer behavior you can study. And based on that, you can predict whether the customers will leave the service or not. So, this kind of churn prediction are being very popular as a application of logistic regression. Insurance claim. There are many fraud claims come in the insurance industry. In that case, you need to use logistic regression and you need to improve the or calculate the accuracy rate of your prediction, whether the claim from a client, insurance client is a genuine claim or it is a fraud claim. This is a very popular example of logistic regression in the insurance industry also. Similarly, gender profiling, whether in the office or in a different domain we use whether the candidate is a man or a woman. So, that you can also decide based on the different pattern of the different activities or say different nature of the characteristics of a candidate, you can classify man or woman kind of thing. So, there are many such applications of logistic regression, whether the candidate will score in the exam, say pass or fail. So, this kind of applications you can also, how much hours the candidate is studying, based on that also you can take a call, whether the candidate will pass or fail based on the pass data and the logistic regression model. So, how this model fit and how does it work, that we will understand today. Here, we have written few more aspects of this logistic regression as an introductory part. Here you can see we will deal only the binary dependent variable having two possible outcomes. So, there are many more possible like success, failure, yes, no. You can see success, failure, yes, no, buy or don't buy, fault or default, say loan, survive or die. I will give you examples from couple of all these today, you will get to know. So, they are all dichotomous application of logistic regression, that means outcome will be binary, two possible cases. But there might be more than that, like a multi-lomial, like more than two outcomes, buy, hold, sell. So, this type of classification can also be done as a outcome variable. So, these are called multi-lomials, there will be only original logistic regression are also in there. So, different type of classifications are there. So, today we will consider only on the binary dependent variable, like yes or no or zero and one kind of thing with two possible outcomes. Therefore, we will quote the values of the binary variables, response as zero or one. Now, this should be independent, the outcomes or should be independent as well as the observations of the independent variables should be independent to each other. There should not be any multicollinearity, like the regression analysis we do as a assumption, that also we will be implementing here also, we will be considering that also, that there should be no multicollinearity among the independent variable. Now, based on this assumption and the based on this basic understanding of background, let us understand in deep the difference between the linear regression and logistic regression. Because our objective is to understand the logistic regression, but it is very much similar like the linear regression. So, because it is also regression. So, here you need to understand what additional aspects we are covering in logistic regression, which we are not there in linear regression and what is the advantage of logistic regression and how we do model it. So, let us understand that first point, both are supervised learning, because your dependent variable is there, here also one outcome variable will be there. So, therefore, both are supervised learning.  So, therefore, you are supervising the system, therefore, both are supervised model. This is called supervised regression model, this is called supervised classification model. Why it is not a simple regression model? It is a classification model, because your outcome are not the actual value of y. Your outcome are classified into category, like yes, no, by, hold, like the example that I have shown you. So, therefore, like 0, 1 kind of thing binary. So, therefore, we call it is a classification model also. At the same time, your basic regression are called as a predicting the continuous outcome, right, like y can be anything, like 1, 2, 3, 4, 5, 6, anything, any continuous variable also it can take any real value, but like money cost, etcetera. But here, you are predicting variables of outcome are categorical, as I told about like binary kind of thing, 0 or 1, right, or yes or no kind of thing, die or survived or say, you know, default or not default. Also, this in linear regression, the models the relationship between the independent variable and dependable through continuous outcome of dependent variable, which I told and it can take any real value. Whereas, in logistic regression, it models the relationship between the independent variable and the probability of the binary outcome of the system. So, remember the basic difference here, you can see here it is just a simple relationship, right, between the dependent variable and independent variable, but here it says that it models the relationship between the independent variables, between the independent variables and the probability of outcome as a binary decision making, look at here. The probability are being calculated using the help of independent variable. So, this is the difference part. So, y will be replaced here with a different function that is called sigmoid function or logistic curve, how that works that we will understand. So, this is the overall, you know, concept or difference between the linear regression and logistic regression. Here, you can see simple regression analysis. So, here, you know, if you have a data, say, for a given x, say, x and y, you can fit a line, right. So, this is what your simple regression, but this graph is nothing but the same graph, but when your data is, you know, plotted like this way, the x values are plotted in this way. And how we will fit this line that we will discuss and we will convert the concept into a logistic regression model. But when it comes to the logistic regression, as I told, this y will be replaced with a orderly c of log function, ln function. So, that we will convert eventually into a formula called sigmoid function formula and that will be nothing but the probability of your outcome, look at the probability of your outcome. It is not binary yet. It is a pure probability. It could be the range of p which will be 0, less equals to p, less equals to 1. Remember, the outcome is we are talking about binary or the yes or no kind of thing categorical. But effectively, outcome will be the formula of sigmoid function of this graph will be like this, but we will classify them at the end into binary of 0 or 1. We will classify them like hold the stock or say, you know, sell the stock or the person has died or person is survived. So, this type of, you know, yes or no kind of thing, approve the loan or do not approve the loan, yes or yes or no, but there will be a probability in between. So, 0.45, 0.75, so then you will be confused, right, whether to approve the loan or not, that will understand and then after that you will put a cutoff point in the middle and then you classify, then you classify your data or the outcome into two category yes or no. So, therefore, this is called the basic logistic regression with binary outcome. Now, let us illustrate this, how this calculation has been done and how this has been developed the method of logistic regression. So, here we have come to the normal screen and here you can see this is the basic regression, basic regression. So, what we have discussed that I am trying to illustrate how the transition has been happened from a logistic regression to a logistic regression when the data are given in a or data or the observations of the outcome are been required in a categorical format. So, let us first understand that now, but as I told we will calculate the probability and the probability will be converted into categorical outcome at the end, but now first understand this is your say regression. Now, what is the regression means it is suppose x, this is your y, let us start with the scratch again and this is your data say, right, this is your data and you can fit a line like y equals to beta 0 plus say beta 1 xa, beta 1 xa, right, say 1 variable. If you have more than 1 variable you can then add more. Suppose here in a two dimension we can understand the concept, so we are focusing only on two dimension concept now, right. So, this is your basic regression. Now, if your data are given say you know most of the data of y are falling in this side and another data are falling in like this side say the y value. In that case how will fit your regression, how will fit your regression for this data?  So, it is a linear line, so it can go up to any infinite range, right, it can go down also. So, how will restrict that because your outcome should be you know in a probability value as I told the probability the occurrence of observation should be measured through probability not through the actual value of y. So, you cannot put this type of line, so you need to cut this line right somewhere you need to cut this line, so that it should not go thus there should be sinning it should not go beyond 1 it should not go below 0. So, you need to put a sinning, so you have to put a sinning you need a function which will capture this type of nature of the graph, so that the function should capture say let me open a pen you will get to know the function should capture a the nature of the outcome in this manner. So, so that your most of the data are been covered and it is not going above it is not going this side it is not going below the 0 point. So, therefore, these points are means also covered this is your x, but this y value look at this y we are replacing with say probability right suppose we will discuss that, but data observations are here say for the timing, so observations are here say now what happens since observations are here most of the here could be a couple of observations, but most of the observations are about lying here and here, so we need a function which will replace this y equals to alpha plus beta x or say you know y equals to you know beta 0 plus beta 1 x the way we have written in our today's session. So, the notation let us use that similar notation therefore, if this type of linear regression are there you cannot fit the actual data effectively it is a wrong prediction are coming because it is going out and going down also. So, you have to cut you have to put a sinning in below as well as the in the top also this type of sinning can be represented through symbolite function through symbolite function look at whatever the value of y say or x whatever you can put z also whatever the value of function you can generally the symbolite function are been defined like this f x equals to 1 by 1 plus e to the power minus x. So, this is the you know symbolite function formula or people define f z say equals to 1 by 1 plus e to the power minus z. Sometimes people define it like this way also you know people define it equals to e to the power z by you know 1 plus e to the power z, but we will define our you know formula of symbolite function through this particular relationship. So, now how does it work? So, therefore, since you cannot take this particular graph because it is going up or it is going down you have to cut somewhere. So, you need a function like this. So, that function are been developed through symbolite function or logit function and that will be replaced in place of this basic regression line will replace through this and that can be defined the relationship of the data and the data means independent variable data and the probability can be defined with the logistic regression formula. This is the final formula of your logistic regression how it is been developed I will explain in the next slide. Now, let us understand how this logistic function is developed from this symbolite function right. So, this is the you know general formula of the symbolite function which I have mentioned here you know generally people define like as I told people define by 1 by 1 plus e to the power minus z. So, this way you can also you can define is a function of that you know you can you know you can mention this also f y this is this is nothing but this f y is nothing, but you can develop as a later stage you know in terms of p which will develop like this right. So, how this you know f y function are been calculated or replaced through you know this is f y is a replaced through this function that we will discuss this is nothing, but the probability this will be converted into probability which I have mentioned as a p, but how this works and how the logistics function have developed let us see here. So, this is the overall function because you cannot you know put the line that you have to cut and there also you have to cut you have to put a ceiling in both side and you need a function like this. So, therefore, we are putting this s type graph or say symbolite graph right. Now, this is the function of the probability right. So, symbolite function we have captured let us say now since p is nothing, but your probability and earlier you had the line say y equals to say beta 0 plus say beta 1 x right, but that we are going to replace we will replace that because you cannot put the line regression line you need to put the symbolite function. So, we will put this we use this formula for the time being it is a probability, but we will use this formula as I mentioned the symbolite function or nothing, but 1 by 1 plus e to the power minus x a. So, this formula say let us say. So, this formula are the basic symbolite function formula, but let us see how we can calculate this particular velocity regression model. So, p is here.  It will look like this and after rearranging your value of p. So, let me write here p by 1 minus p will be if you do this by this and this if you take these two value here it would be e to the power beta 0 plus beta 1 x after the calculation. If you take p by this ratio p by 1 minus p this value by this value it will be you know if you after calculation it will be like you know e to the power minus of beta 0 plus beta 1 x by 1 plus e to the power minus beta 0 plus beta 1 x. So, if you do that do that the denominator will be all canceling out and it would be ultimately effectively after this adjustment this e to the power minus of beta 0 plus beta 1 x will go up and it will become like this. So, effectively you found this formula now this p by 1 minus p is what it is nothing, but the odd value probability p is the probability of the success the occurrence of the chance of success 1 minus p is the chance of failure. So, this ratio are called the odd ratio. So, we call it is a odd of the function. Now, if you take ln of now this is the formula for your intermediate understanding, but the logistic function formula is here how will get it take the ln in both side. If you take the ln on both side this ln of both side ln of both side here this value will remain like this the left hand side will become this and right hand side will become ln and e exponential value will cancel out and the entire simple formula of linear relationship will come. If it is one variable it will be like this if it is a more than one variable it will be look like plus say beta 2 x 2 kind of thing if it is a more than one independent variable, but overall we are focusing only one independent variable. So, overall your formula will be like this. This is the logistic regression formula and it is been derived from the probability function look at here. So, this is the formula here in this case your p lies between say to some extent 0 to 1, but when you take p by 1 minus p it is to some extent you know 0 to say infinite it is ranges come. So, in order to put the range of ceiling you take the ln of both side and it is to some extent it is become minus infinity to plus infinity what does it mean this right hand side is your actual real value of x right and it is a linear combination. So, it can take minus x 1 can be anything x can be say independent variable it can be minus value it can take positive real value also high large value also. So, it has a infinite range right. So, therefore, your left hand side should also be look like this. So, when you put a ln value effectively it takes care of the range from lower infinity to minus infinity. So, the relationship is been well established effectively and this formula are called the logistic regression formula, but in calculation we will use this basic symbol function formula p equals to 1 by 1 plus e to the power minus this y y is nothing, but y what y is nothing, but 1 by 1 plus this y you have replaced 1 by e to the power minus of beta 0 plus beta 1 x. So, this formula we will use in our calculation of logistic function and look at here how we have look at here now how we have replace this function you can see look at here this was your data sets a data sets were like this here couple of data suppose here you will see when I will draw couple of examples you will get to know how the data are bit pattern because data are being scattered or the plotted like this way outcome variables. So, therefore, you need the replacement of logistic regression line and you need a symbol function or logistic function and therefore, you need this type of formula and you replace and which will cater the pattern of the data as a s f that is it this is your logistic regression model straight line 1 or your linear regression model which we are replacing now with a symbol function and the corresponding relationship of logistic regression have been developed this is for only understanding of logistic regression formula, but in calculation we will use this formula to calculate the probability value. Now, let us summarize the process now the point here is that remember overall we understood that and the we estimate the probabilities of the observations belonging to a class especially say p equals to 1 say success as a binary case which determines the probability and the observations belonging to a class 1 say approve the loan right, but there could be another case that do not approve the loan. So, in that case it could be 0 say. So, there are 2 class yes or no. So, 0 case will fall in this side and 1 case will fall in this side approve the loan.  So, this cut off point sometimes people use as a you know say 0.5 0.5. So, whatever the probability are coming for any new candidates or new you know calculation process or observations of independent variables you will get a corresponding probability. So, that probability will define whether the outcome will be yes or no categorical whether it will be approved or not approved. So, that will be decided based on the new variable and the formula of that once you develop the formula you might say that is how will find the values of formulas this formula this beta 0 and beta 1 are nothing, but the coefficients of logistic regression which can be calculated through you know any software or say you know maximum likelihood function. So, we are not focusing that, but once you understand the formula and the corresponding beta 0 and beta 1 I will show you in excel how this you know all this entire formula are been calculated and the probability function can be developed. Once that is done your entire structure is ready of logistic regression and remember this is nothing, but your odd value right success by failure and this can be defined like this probability of success by failure is nothing, but your odd and otherwise in other way probability is nothing, but odd by 1 plus odd we called as odd ratio odd ratio it is been used sometimes for any different calculation of the application domain for different data sets. So, therefore, this is the overall you know summary of your logistic regression where the how to develop the cutoff and how what is the P value say symbol function and how you are converting that P value with their symbol function to a logistic regression model this is what your model right this is what your model final model of logistic regression. Now let us understand the cutoff point how to calculate the cutoff point that we are going to discuss now here. So, we have developed your model say logistic regression model say ln of P by 1 minus P equals to say you know say beta 0 we have used beta 0 right here plus beta 1 say x. So, this is a basic one one independent variable or predictor variable we are considering suppose this is your formula and this is your calculation through symbol function which you have replaced here right. Now look at suppose function is ready now. Now suppose you have a new observation like in regression what you do in regression you do y equals to say beta 0 plus beta 1 x right in regression and once you fit the regression line regression line you put fit the regression line and for a new x say for new x say x equals to say 50 you put in the line x equals to 50 you put here x equals to 50 you will get the value of y you will get the value of y here corresponding y you find that is what your basic regression similar way same logic you can implement here also because you have fit the model graph now you have fit the model graph now. So, now what you do for a new candidate say new candidate say you know whether the candidate will pass or fail how much how many hours every day he study or concentrate on the research. So, based on that you can think about the pass or fail we will get a degree or not all these things you can think or say you know say credit score. So, all this suppose you can take a example for a logistic regression application. Now, suppose you found that 50 is the score of the candidate say credit score or all say he studied etcetera. So, based on that you can see 50 is coming out here. So, p equals to 99 percent because in the you can put 50 here and beta 0 and beta 1 once you get the coefficient of beta 0 beta 1 using the software also you know maximum likelihood function you will get the formula of this. Now, you have to calculate the probability for the symbol function. Now, you put the x value a new 50 say x say new value and this corresponding you will get the probability like here in regression look at the regression look at my mouse look at here like look at this part. So, like the like the way you do the regression you put any new x you will get the y value right here. Similarly, here also you put any new x new x you will get through this function because all the function is been developed you will get the corresponding probability look at here 0.85 0.85. So, for 40 for 50 99 percent. So, one clear case. So, candidate will pass because he is studying more or say civil score is high or say you know candidate age is like this whatever. Now, so age is low or say civil score is low what also not studying effectively. So, therefore, the probability say only 0.7 say 7 percent say right here you can see very closer to 0 30 it is a 23 percent. So, in that case you can put a cutoff. So, that you can put a cutoff line you can put a cutoff line. So, that you can classify the data of a new candidate into two category yes or no approve or don't approve pass or fail right survive or died. So, this is what the cutoff point decide. Generally, people decide the cutoff point as a 0.5, but it is not fixed you can change it. Suppose, if you think that majority of candidates are falling here 0.5 say 0.6 etcetera. So, you can you know increase or reduce the cutoff point, but generally 50 percent are benchmark cutoff below that suppose if somebody comes with say 0.49 the outcome of the candidate the probability of that outcome based on the data sets based on the data sets we are getting suppose 0.49. So, 0.49 is very closer to 50 percent right. So, in which category you will put that candidate approve the loan or do not approve the loan. It is your decision because you have put 0.5 as a cutoff point you can say that no will not approve the loan because it is a classification you decide that no will not approve the loan, but if the candidate is of 0.51 51 percent chance that he will say like you know outcome of your model say based on the data set score and all these things we found probability as a why not why actual value we are deciding whether to approve the loan or not. So, you are finding say you know 0.51 the score of success that the person will be able to repay the loan say. So, you are getting 0.51. So, 51 percent. So, you put the category put this fellow into the approve loan category. In that case if somebody come up with 85 percent say chance that he will repay the loan even this fellow on this 0.51 percent of chance of approving like repaying the loan that fellow is also coming into the same category because you have considered into two category. So, this is what the classification point and the cutoff point you decide you can reduce the cutoff point based on your wish you can increase the cutoff point, but you can consider it into two category as a binary case of final 0 or 1. All this case will fall into all this case will fall above 0.5 into one category and all this case will fall below 0.5 as a no category or 0 category binary variable binary 0 or 1 that is it the final outcome, but effectively we are calculating the probability look at for a new candidate for any new candidate we are calculating the in a reverse manner you are calculating the p value look at the formula we are calculating the p value and here this logistic regression function formula developed through your actual relationship look at the linear combination of the data and their relationship with p are been defined through this logistic regression. So, this defines the range of the data sets this is the probability which is nothing, but 0 to 1 the range of p the range of p is nothing, but 0 to 1 right that is fine this is the final formula of your symbol function which we have placed here, but we are defining that through logistic formula logistic function formula because you need to define the range right. So, here p range is 0 to 1, but this says that it can be minus infinity to plus infinity because this is the right hand side is a linear combination which has a no limit therefore, this should also have a no limit, but p by 1 minus p is also has a issue because p by 1 minus p ranges from 0 to infinity. So, it has a it has no ceiling, but you have to cut a ceiling point right therefore, you need to put a range which and the lower side and upper side should also match put together in with the right hand side we put a ln function and which how the ln function are derived that I have shown in the previous slide. So, this is what the overall aspects or understanding of logistic regression and if you would like to see the summary the first point the overall summary of you know or understanding of say you know inter logistic regression. The logistic formula regression formula are been defined through this or through this. This ranges from 0 to 1 and this ranges from minus infinity to plus infinity look a negative infinity to positive infinity. So, this the relationship I mean developed now right and this is the odd ratio like success by failure which has a 0, but it has a positive infinity. So, you cannot consider this formula right you cannot define this formula rather you convert this by taking ln which is very easy to understand and this formula are called the basic or representative of logistic regression formula, but effectively we will use this for our calculation purpose right. Now, look at that therefore, the final final point therefore, the logistic regression which is the output of linear regression between 0 to 1 look at the 0 to 1 and we can easily predict the class in which it belongs like lower case or upper case and this beta 0 beta 1 or if you have a more variable say you know if you put x 1 plus beta 2 x 2 etcetera for more I will show you an example for more independent variable in that case all these coefficients can be calculated through maximum likelihood function equivalent with least square here because it is a very complicated logistic function are there you have to take partial derivative and all these things based on the number of very parameter beta 0 beta 1 etcetera. So, you need ln function and use the maximum likelihood formula and there you can calculate the coefficients value using software say excel state or real state or adrix or you know python easily this calculation are been the derivation of this calculation of coefficients are been done there. So, we are not discussing that part in detail assume that we get the beta 0 beta 1 coefficients and we fit the model and then how we can apply it in real data. So, let us go the application process to understand the inter logistic regression model with couple of illustration.


Today, let's unbox the new Leonardo Oficina Italiana Exclusive Cosmic Dust Supernova fountain pin. This is only available at Pinchelay. You saw the custom sleeve there, and then you've got your black Leonardo cardboard box with the classic black pin box inside, and inside that, you'll find your pin information, including information about the company and also warranty information and everything you need to know about your pin, and this is the Cosmic Dust Supernova. It is a beautiful pin, and as we always like to remind you, each pin will be unique depending on the piece of resin used to create your pin, and it does have the little Leonardo plastic emblem there, usually connected to the clip, and you see here the Cosmic Dust is paired with silver trims, but it is available in three trims, gold, silver, or gun metal.  This beautiful Cosmic Dust resin is created by the Pinsmiths, and we'll take a look inside this pin. It's a cartridge converter filling system compatible with any international standard size converter or ink cartridges, and it does come with a Leonardo branded converter already installed in the pin. So it's ready to go as soon as it arrives, you can fill it with any bottled fountain pin safe ink that you prefer. The cap on this pin is threaded and the pin is postable, so if you like writing with your pin posted, this does work. Okay, and let's take a look at the other trims here. This is the ruthenium or gun metal trim, and this is your Cosmic Dust in gold. So choose your favorite. You can see how the resin varies greatly between the different pins, which makes it even more fun. Okay, so this is an exclusive, only available at Pinchelay. It's also a numbered edition, so you can look forward to that. For more information, visit pinchelay.com.


So as before, we put the honey garlic in this, right? So fill this up with honey and garlic layered, and then it all floated to the top, right? And I just transferred, this was a second round on this one. Now this is really honey garlicky, honey in the bottom here, right? But the top part was sort of liquid honey garlicky, right? So this I just transferred into this. Oh, Galaxy One Epicure number one is amazing. Huey de Montre. This is the honey garlic in here. You can see the garlic and this one has turmeric and ginger in it. So this is turmeric and ginger in the bottom. The garlic is in chunks, the cloves, right? So this is what I just transferred from this big one into this, right? And then we're gonna buy more dried garlic and put it into this big jar, okay? And then put more honey in there and create another one of these. So this is the second batch that I've made. This is the first batch that we made and we already ate all the garlic. And I use this honey, the honey garlic thing for the glaze on the chicken. And I've used it for the glaze on both sides, right? When I'm broiling it, so I cook the chicken and then when I bring it out, take the foil off, take the lid off, and then glaze one side, put it on broil for like four minutes, five minutes and then flip the chicken, glaze that side, put it on broil so you get honey garlic glaze on the chicken. And we eat the garlics. Usually I'm eating like one or two, every two to three days or sometimes three a day, right? And it's amazing. So this is the way I've used the honey garlic stuff. Super good, super good. Very nice, very nice.


And welcome back to another episode of Johnny Q reacts to the hate comments.  I could literally get my girlfriend pregnant have a son and then teach him to make better art than you in 0.2 seconds Okay, couple of things to unpack here.  You're also assuming you're gonna have a son which that's not how it works And so since you're getting your girlfriend pregnant you might not stick around because you have to wait nine months I don't know if you're about the commitment, but so let's say you're there for the nine months after and then when the baby comes out You're not worried about the placenta the umbilical cord the little oozes the oozes the liquids that come out You're worried about bringing your baby to the world and having them spin art in 0.2 seconds my guy Priority I honestly I love this comment. It made my day And that is episode two