the doctoral degree tier list. In this video, I'm going to be talking about the best and the worst doctoral level degrees, and I'm going to be ranking the doctoral degrees from S tier, which is the best, to F tier, which is the worst. And I've been hard at work ranking these for the new year and I've added some new things in this year. This is going to be the best list I've ever released. And we're going to be going over really important things that you need to know like salary, demand, et cetera. But the biggest difference in this year's list is instead of just focusing on the demand of the careers in general, I'm going to be focusing on the demand at the entry level. Right? Because there's some careers that have a lot of demand overall, but at the entry level, it's really hard to break in. So that was an improvement that I made on this year's list and that's why I think it's going to be the best list ever. So if you appreciate these types of videos, go ahead and absolutely blast that like button like Dr. Strange and let's jump into it. All right, so there is a lot to go over in this video. I actually have 36 pages of notes on this. So we're going to try to go through this fast so it's not like a 30 or 40 minute video. All right, so the first one on the list that I'm going to talk about is architect. So here are the stats for architects on BLS. This is one where typically in order to get those really good jobs, you are going to have to get a master's or a doctoral level degree. According to BLS, architects make about $80,000 a year. There's 133,000 jobs and it's growing at 8%, which is faster than average. Now, 80,000 a year isn't that good if you got a doctorate. That's a lot of debt to go into and a lot of time that you're going to have to spend in order to get that degree, but it's also not terrible. So this one goes into C tier. Next one on the list is acupuncturist. I've explained this one before, acupuncture, natural medicine, that sort of thing. I have nothing against it. Don't get me wrong, like I've got comments about that. Like I'm a natural medicine hater. I'm not, it's just when it comes to the stats, it's not very good. I did that analysis of the debt to income ratio and this one had one of the worst debt to income ratios about 4.6 to one. So yeah, this one goes into F tier. Next one on the list is going to be an art related PhD. Now, according to Glassdoor, artists make $46,000 a year. According to LinkedIn, there's about 28,000 entry level results for artists. And just typically speaking, art related degrees in general for 99.9% of people are not going to be worth it. So yeah, this one goes into F tier. Next one on the list is college professor, but this one has an asterisk. Okay, if you want to become a college professor, I have nothing against that. I think it's actually a really cool job to have. But with that being said, it's very difficult to become a college professor with the majors that are saturated, right? Majors where it's difficult to make money in the first place or they're saturated, there's a lot of people trying to become college professors in those majors. And so it's going to be very difficult. And paradoxically, the ones where there's not a lot of people trying to become college professors like engineering, for instance, AKA degrees that lead to really good job outcomes, there's much more opportunity to become a professor. So yeah, college professor, very difficult to get into. But if you have the right plan, you're the right type of person, right situation, et cetera, you can make this work. So this one I'm going to give B tier, but again, with a huge asterisk, you have to make sure you plan this one out. Next one on the list is chiropractor. And I talked about this one in last year's list. And basically this one has the absolute worst debt to income ratio out of any type of doctoral level degree. It had a 4.9 to one debt to income ratio. If you look up chiropractor on BLS, it says they make about $70,000 a year, 50,000 jobs available, and it's growing at 7%, which is faster than average. If you look it up on Glassdoor, they make about $107,000 a year. And if you type in chiropractor on LinkedIn at the entry level, there's only about 6,000 results. So this is one that requires some subtlety because you can start your own practice as a chiropractor and have a lot of success, but it's pretty difficult to just go out there and get a job. So you need to really be careful if you try to become a chiropractor. So overall, really be careful with this one, but I'm going to go ahead and put it into D tier. Next one on the list is dentist. So dentists make about $159,000 a year, according to BLS, there's 155,000 jobs available, and it's growing at 7%, which is faster than average. According to Glassdoor, dentists make about $251,000 a year. And according to LinkedIn, at the entry level, there's 17,000 results. So this is one that I personally don't like, but that's just me personally.  And guess what? You're going to have to take out a business loan for that. So a lot of the time, dentists will literally end up like a million plus dollars in debt. It's seriously not that uncommon to see. And so by the time you get above ground, by the time you get back to a $0 net worth, you're probably going to be somewhere in between 35 to 45 years old.  Like I want to actually enjoy myself while I'm young. So I don't want to be like, you know, a million dollars in debt when I'm 30 years old, for instance, but I can see why this one can work out for the types of people who are very sort of like long term thinkers. So I'm going to go ahead and put this one into a tier. Next one on the list is going to be lawyer. Now, according to BLS lawyers make $122,000 a year. And according to Glassdoor, they make 112,000. There's also 823,000 jobs available and it's growing at 6%, which is faster than average.  That is a massive problem because there is a ton of people graduating with this degree every year. So it is super, super difficult, especially when you first break in to become a lawyer. So this can be a great career for eight type personalities, people who are extremely proactive, really hard workers, probably also really competitive types as well.  One of the toughest jobs out there for sure. And the type of work you're going to be doing is the grunt work, right? You're going to be doing the type of work that nobody else wants to do. And in a lot of practices out there, they have a ton of leverage over you as well because you're going to be trying to become what's known as a partner. So I'm going to go ahead and put lawyer into B tier. Next one on the list is medical doctor. Now, although I think medical doctor as a career in general is a little bit overrated just because there's so many shows about it. So many people want their kids to become doctors. It's kind of like a status thing. But when you actually look into it, doctors have some of the highest rates of depression as well as suicide unfortunately, because it's a really tough job. So definitely do not become a doctor for the wrong reasons, all right? Make sure if you're trying to become a doctor you're doing it for the right reasons. But with that being said, doctors make great money. You're going to make probably over $250,000 a year. With some specialties you'll make well over 500,000.   You know, there's always new medical studies you need to study, new medications, new advancements, et cetera.  But with that being said for the right type of person medical doctor is S tier. Next one on the list is going to be optometrist. Optometrists make about $115,000 a year. There's 42,000 jobs available and it's growing at 10% which is faster than average. So this is one that I ranked a little bit lower last year and some people commented about it. They made some really good points and I actually agree with them. You're going to make over $100,000 a year. It's growing at over 10% which is faster than average. Make sure you go to a good school where you're not going to go deep into debt with this one. But overall, especially for a doctoral level degree pretty good, I'm going to put it into B tier. Next one on the list is going to be a dental specialist. So it could be an orthodontist, periodontist or an endodontist. So this is basically somebody who became a dentist and they went even further and specialized and maybe became an orthodontist for instance. So this is going to be even more time and again has a lot of the same problems with dentists. You're going to have to start your own practice most likely and yeah, you're going to have to go deep in debt. But with that being said, you are going to make phenomenal money. For instance, endodontists make about $232,000 a year. If you start your own practice you'll make a lot more than that. And if you look up periodontist on LinkedIn you're going to see about 7,500 results at the entry level. So this one is also going into A tier. Next one on the list is pharmacists. This is one I've talked about many times on this channel. I myself am a pharmacist. So pharmacists make about $128,000 a year. There's 314,000 jobs available. And unfortunately the job outlook is growing at 0%. According to Glassdoor, pharmacists make $128,000 a year. And according to LinkedIn at the entry level there's about 30,000 results for pharmacists. So there's about 14,000, 15,000 pharmacists graduating per year. 30,000 results at the entry level. Now these stats on BLS are actually incorrect right now because in the last few years the surge of demand for pharmacists has increased quite a bit. It actually increased so much that they were even offering pharmacists sign-on bonuses. They were trying to incentivize people to go to their company because they needed so many of them. But with that being said the reason why the demand is so bad for this one is because basically the schools are just completely out of control. They're opening schools left and right. There's way too many schools that are just churning out pharmacy students. And somebody kind of needs to put a clamp on that kind of like medical doctor schools did. And once they do that this profession will be totally fine. And also with that being said there's a lot of people who go into pharmacy and they think they're gonna be a retail pharmacist and they think that's the only type of pharmacist, right? But there's actually 50 other types of pharmacists. So definitely look into this and look at all the different specialties. Retail pharmacy is typically the least liked one. A lot of people do not want to go into retail. So just keep that in mind. And it did have a debt to income ratio of about 2.2 to one which isn't too bad. So yeah, this one is gonna go into A tier for doctoral level degrees. Next one on the list is physical therapist. The debt to income ratio here is about 2.5 to one. So a little bit less good but physical therapists actually have the highest job satisfaction out of any job on this list. So physical therapists make about $89,000 a year. There's 247,000 jobs and it's growing at 22% which is much faster than average. According to Glassdoor they make 82,000 and on LinkedIn if you type that in at the entry level you're gonna see 73,000 results. So the money isn't amazing to be honest with you especially with the amount of schooling you have to go through but this one does have the highest job satisfaction so you do have to count that in and I think I'm counting that a little bit more this year and it's also relatively good at the entry level. So for that reason I am gonna put physical therapist in A tier. Next one on the list is going to be a psychologist at the doctoral level. So there's two different degrees here. There's the PhD and then there's the PSID. The debt to income ratio is a bit high here at 3.2 to one and if you look up psychologists on BLS they make about $80,000 a year. There's 181,000 jobs available but it is growing at 14% which is much faster than average and if you look up psychologist on Glassdoor you're gonna see 85,000 a year. If you look up psychologist on LinkedIn at the entry level you're gonna see 136,000 results. All right so there's a few positives here when it comes to becoming a psychologist. One of the positives is you absolutely do have to have a degree so there is that barrier to entry. It is a very interesting subject as well. A lot of people are very fascinated by psychology but with that being said I see a huge mistake that so many people make and that is they'll major in psychology in undergrad not realizing that in order to get any good jobs any halfway decent jobs they're gonna need to get a master's at minimum and even then it's probably not good enough. Typically they're gonna have to get a doctorate and a lot of people do not realize this going in. So you really need to do your research honestly with any of these doctoral degrees. I would say that doctorates are not good for 95% of people's situations, right? Make sure you do your research if you consider any of these doctorates but I'll go ahead and put this one into C tier. Next one on the list is going to be a science related PhD. So science is the worst of all the different types of STEM degrees typically especially at the bachelor's level but at the doctoral level they can be okay. So scientists for instance on Glassdoor make about $107,000 a year and if you type in scientist on LinkedIn at the entry level you're gonna see 32,000 results. But yeah, be careful here because there's a lot of people who are really fascinated by science they'll get the bachelor degree they think they can get a job they can't so they end up having to go back and get a master's or a doctorate. So definitely plan this one out. So I think I'm gonna go ahead and put this one into B tier. Next one on the list is going to be social science and humanity related PhDs. Another one where the degrees are really bad at the bachelor's level typically you're not gonna be able to get a job in anything related to the major at the bachelor's level and in many cases not even at the master's level but if you are able to get to that doctoral level you might have a chance. But again, I mean I feel like a broken record I can't stress this enough make sure you do your research if you consider any PhD especially if you're going for like a social science related PhD. So if you type in the keyword social science on Glassdoor they show about $90,000 a year and if you look up social sciences on LinkedIn that keyword is in about 12,000 different job postings. So this one I'll go ahead and put into D tier overall. Next one on the list is going to be PIM related PhDs. So not the STEM, just the TE and the M. So that's technology, engineering and mathematics. So obviously a ton of super, super high paying jobs here it is questionable whether you need a doctorate in a lot of these. But with that being said if you're going into something like machine learning, AI, that sort of thing something that's incredibly complicated like that getting a doctorate can help. And there's going to be a ton of demand. For instance, you know, computer engineering 109,000 results at the entry level and there's lots and lots of jobs out there that are super high paying. I mean, you're definitely going to be making over six figures a year. This one I will put into A tier. Next one on the list is going to be doctorates of education aka doctorates to become a teacher. Now high school teachers make about $61,000 a year. If you get a doctorate, you'll very likely make more than that. The positives of being a teacher is you're almost guaranteed to have a job. They have an incredibly low unemployment rate. The negatives of being a teacher is you're going to get worked really hard. Doesn't pay all that well. You work super, super hard. And then you're just going to be making basically the same amount for a very long time. So this one overall, because of the fact that you're very likely to get a job I will put it into C tier. Next one on the list is going to be veterinarians. So veterinarians make about $95,000 a year. There's 84,000 jobs available. And it's growing at 18%, which is much faster than average. Now interestingly enough, if you look up veterinarian on Glassdoor, it shows they make about $211,000 a year. And if you look up veterinarian on LinkedIn at the entry level, it shows about 18,000 results. So overall this one did rise in the rankings this year. I looked into it a little more deeply. Also some people left comments and I do read those comments and they made some pretty good arguments. So I am going to go ahead and put this one into B tier. Now, one thing I did want to mention here is a lot of the medical related degrees are really good because you absolutely have to get the degree in order to get licensed and to get into that profession. That creates what's known as a barrier to entry. So other people who want to get into the profession also have to get the degree and jump through those hoops. And that's a good thing for you if you already have the degree. Another thing I want to mention is a lot of the time PhD programs, so not professional degrees, but PhD programs can be incredibly long and incredibly difficult. Right, so I've talked about this in other videos and I estimate that the average PhD, AKA the time it takes to get your bachelor's, master's and then your PhD, is going to be over 13 years. So if you start at 18, you're likely not going to get your PhD until you're 31 or 32. And the average PhD holder goes over $100,000 in debt. And again, I broke this down extensively in the video why you shouldn't go to graduate school. Now I've heard so many horror stories about PhD programs honestly. Like it's actually crazy how many horror stories I've heard. But somebody on this channel who I interviewed who had one of those stories was Javier. And Javier was going through a PhD program. He really wasn't enjoying it and he realized that even if he was able to get through it, even if he was able to do those 80 hour plus work weeks getting paid basically nothing and get to the other side, the jobs he was looking at, first of all, probably wasn't going to be able to get the job. And second, even if he did, it didn't excite him. So what did he do instead? He went for an in-demand career like digital marketing. So if you're in this situation where you're starting to research more and realize that the path you're heading down is not very good and that graduate school in many cases is very similar to a pyramid scheme, I highly recommend you check out that video. And also if you're interested in getting trained in digital marketing, I do have a free training. It's actually free masterclass which I'll put down in the description as well as the pinned comment below. The masterclass is done by my friend Seth who has probably created more digital marketers than any other human being on the planet. And again, check out that interview with Javier right here.


Hello there, we are now going to test the claim about a mean using the concept of hypothesis testing So we have to be a little bit careful whenever we use Hypothesis testing for testing a mean because there's two different types of distributions that we would use for this So before I dive into that Please note that the following notation if you see in that sample size X bar sample mean and then the Greek letter Mu is the population mean Now when the population standard deviation sigma is not known We have to use the t distribution To find the p values and to perform the hypothesis test remember the t distribution is kind of like the standard normal distribution The two are practically identical the larger your sample sizes But the t distribution is a little bit more accurate for the sake of doing these sorts of hypothesis tests So you use the t distribution when the population standard deviation is not known When sigma is not known So to use the method we're about to use the sample has to be a simple random sample and either the population is normally Distributed meaning they'll shaped or the sample size is greater than 30 So we're going to practice using the compute tab the t distribution region of Google sheets to find p values So let's find the p value for a right tail test with n equals 12 and a test statistic of 2.573 So let's start with a picture Remember how to find the p value. What do we use to find the p value? We use a test statistic use that test statistic Define the p value I Have a right tail test so on your bell curve You're gonna shade the right region is the test statistic that separates this right hand region from the rest of the bell curve The area of that region is Going to be the p value the area of the tails is going to be the p value in this case. We just have a right tail It's a right tail test So you're going to jump into Google sheets and you'll go to the compute tab to the t distribution region All right, so This is for Google sheets now go to the compute tab Go to t distribution And You'll type the following in You'll type in mu equals zero You'll type in sigma equals one You'll also type in Degrees of freedom member t distribution uses a something called degrees of freedom. It's sample size minus one so 12 minus 1 is 11 and We'll type in your lower bound and your upper bound So you're trying to find area under the curve. So you're using x-axis data values So the lower bound is 2.573. That's where your shading starts and it never stops So six nines is the upper bound So now let's go to Google sheets Google sheets. You're hanging around the compute tab T distribution region zero for mu one for sigma my degrees of freedom in this case is going to be 11 12 minus 1 is 11 the lower bound is going to be 2.573 and upper bound is six nines And look at that you get a p-value of about To four decimal places to nine rounds up to a ten which makes the two go up to a three so point oh one three Point oh one three Point oh one three So ask us what the p-value is the p-value is point oh one three in The event you had a two-tailed test and you had a right tail in the left tail shaded You would double this Just as you can use the test statistic to find the p-value. You can also use alpha to find critical values of Our bell curbs for our test using the t-distribution as well in the compute tab You'll still keep mu as zero and sigma as one You'll still type your degrees of freedom and then you'll input the area to the left We'll do one example of finding the critical value Coming up here in a couple examples We don't spend much time on finding critical values just because the p-value method is so convenient Remember if you get a p-value you compare it to alpha jobs done for the critical value method You got to do some comparison with the test statistic and it's a little bit more work Now to get Google sheets to do everything for you you type in summary statistics Statistics that gives you p-value and then you draw your conclusion from that you'll use the data list tab You'll use the one variable confidence interval p-value t-distribution region and you'll type in x bar s and And then your population mean under consideration You'll also put your sign of your alternative hypothesis. So unlike a proportion we have to type in five pieces of information So Radiation emission measurements corresponding to a sample of 11 cell phones were taken use a point zero five level Significance to test the claim you see that word claim you should wake up Claim that cell phones have a mean radiation less than one So I have a Mean less than one is what they're talking about in my question So what would your hypothesis be? Mune less than one would go where to the null or the alternative. It does not contain equality So it's got to go to the alternative What's the opposite of less than Well, technically it's greater than or equal to but remember for the sake of convenience We like to just write equal to for the null always So we're a claim what they're talking about a question is the alternative hypothesis All right, so in Google sheets you're gonna have to type in a lot of information Well, it's not really that bad. It's better than doing everything by hand So in Google sheets, we're gonna be to the we're gonna go to the daddlest tab to the t-distribution region for confidence intervals and p-values You're gonna type X bar equals 0.938 you're gonna type your sample standard deviation as point four two three You're going to type your sample size As 11 You're going to type your value for mu mu not under consideration the value used in your hypotheses is one And then you have your sign for your alternative hypothesis, which is less than these are the five things you need to input And this is what's going to give us our p-value Let's type these things in the Google sheets now So Google sheets, we're gonna go to the daddlest tab and We're focused on the t-distribution region. We use t because we don't know sigma We don't know the population standard deviation if we did we would go down here and use the z-distribution region So we know that X bar is point nine three eight S is point four two three our sample size in this case is eleven our value from you We're looking at is one and then our alternative hypothesis sign is s then Look at your p-value there. That's a pretty high p-value point three one eight seven point three one eight seven So point three one eight seven Guess what we're gonna do with that We're gonna compare it the alpha You compare that p-value to alpha if they don't give you a level of significance We use point zero five they told us in the question they use point zero five anyway So how does our infamous p-value compare to alpha is definitely greater than? So since we're not under alpha we fail to reject the null hypothesis We fail to reject it All right, so as a result We're stuck on the null. We can't say anything about our all about our alternative, which is our claim So the actual statement is to say there is not Sufficient evidence to support the claim that cell phones have a mean radiation level that is less than one There's not sufficient evidence to support the claim So once again, we failed to reject the null and then our claim did not include equality So we failed to reject the null So we're either in rose three or four and our claim does not include equality That means it's the alternative hypothesis. There is not sufficient evidence to support the claim that da da da da Here's an example we did of confidence intervals, but now we'll do it with Hypothesis testing in a test of the effectiveness of garlic for lowering cholesterol We had 49 subjects that were treated with what raw garlic Cholesterol levels were measured before and after the treatment and the changes in their levels of cholesterol They had a mean of point four and a standard deviation of 21. So that's from our sample Test the claim that with garlic treatment the mean change in LDL cholesterol is greater than zero So we're looking at mu greater than zero And then what does the results suggest about the effectiveness? So we'll state the claim hypothesis test statistic p-value and final conclusion All right. So what I have here Is let's state the hypothesis Mu is greater than zero would go where? It does not contain equality. So it must go with the alternative hypothesis therefore the null is going to be less than or equal to zero or Better put as just equal to zero So greater than zero is what was talked about in the question. So that is my claim Let's look at what we would type in the Google sheets now Google sheets is perfect for calculating and giving you the statistic test statistic in the p-value Remember, this is all coming from the data list tab Because we're just typing in summary statistics It's important you use the t-distribution region because you do not know the population standard deviation So step one what is your x bar? Your sample means 0.4 step 2. What is s your sample standard deviations 21 step 3? What is your sample size? 49 step 4. What is your mean value under consideration? 0 and step 5. What is your alternative hypothesis sign? It's greater than we have what is called a right-tailed test So we're going to type those values into Google sheets now So let's do it remember we're focused on the t-distribution region. So we know that our mean is going to be 0.4 our standard deviation 21 Your sample size n is going to be 49 Zero is the value being taken into consideration and your null hypothesis or your alternative hypothesis sign is going to be greater than So look at your p-value another big p-value point four four seven two Point four four seven two point four four Seven two and we have to compare that to alpha you have to compare that to our significance level Which they said is point zero five So what happens when you compare the p-value to your significance level? Well the p-value is definitely bigger So since we're not under the limbo limbo bar we fail to reject The null hypothesis So null hypothesis Fail to reject Remember we can't say anything now about our alternative about our claim There's not sufficient evidence to support it and we say just that There's not sufficient evidence to support the claim that with the garlic treatment the mean change in LDL cholesterol is greater than zero So remember I failed to reject the null hypothesis And my claim does not include equality meaning it was the alternative hypothesis So we say there is not sufficient evidence supports to support the claim that da da da da All right, let's do a kind of a tricky situation here a Simple random sample of the weights of 19 green M&Ms has a mean of point eight six three five How you like that spent on things talking about the weight of M&Ms And it has a standard deviation of point oh five seven zero use a point zero five significance level to test the claim So we need to wake up and we see the word claim that the mean weight Of all green M&Ms is equal to point eight five three five Which is the mean weight required so that M&Ms have the weight printed on the package label Do green M&Ms appear to have weights consistent with the package label We'll run the whole hypothesis test. So basically we'll do everything. We just did Accept instead of using the p-value approach I'm going to put a spin on things and we'll talk about the critical value approach All right, so I'm going to do a different spin on this So we have a mean weight equal to point eight five three five When I write out my hypothesis, where would that go? That would go as the null hypothesis All right next order of business The opposite of that would be to say mu is not equal to point eight five three five The null hypothesis is my claim. It's what was mentioned in the question All right, so we're going to use google sheets We're going to go to the data list tab This data list time and we're going to type in What is our x bar? Point eight six three five. What is my s? What is my sample size? What is my mean value under consideration? And what is my sign? For the alternative hypothesis And that's what we're going to type in the google sheets So I'm going to type the following information point eight six three five for x bar zero point zero five seven zero for s A sample size of nineteen and a population mean of point eight five three five And our sign is going to be not equal to now you see your test statistic here point seven six Is going to be our test statistic and you see your p-value point four five four three So I'll just take them both to four decimal places and let's write them down All right, so I have a test statistic Which is going to equal point seven six four seven And then I have myself a p-value Which is going to be point four five four three now. There's two ways to run a hypothesis test There's two ways Option one you compared the p-value to add to your significance level and you make your conclusion that way option two Is to use The test statistic Critical value approach It's the less commonly used method, but I do want us to have a little bit of fun with that method So we're going to use that method here I have all my important information that I need to find the critical value and to use the critical value test statistic comparison approach Remember you use alpha To find the critical value So what I need to do now is I need to draw my bell curve So draw your bell curve shape And I'm going to shade two tails because this is a two tail test. Why is it a two tail test? That would be because you have not equal to for the alternative hypothesis Two tail tests have both a negative critical value in a positive one So how do you find it use alpha if alpha in this case is going to be point zero five How much does that leave for each of the tails you split alpha up into the two tails Each tail has an area of point zero two five All right, so now you're going to find a data value along the x-axis using area to the left So you'll go to google sheets. The sheet's the compute tab go to the The t distribution region Mu is zero seven was one degrees of freedom is always sample size minus one So 18 in this case an area to the left is point zero two five This will give us our negative critical value So let's see if we can find our negative critical value go to the compute tab zero One degrees of freedom is going to be 18 in our area to the left as we just discussed is going to be Point zero two five And you'll notice that your critical value is negative two point one or negative 2.10 However, you want to say it So our negative critical value is negative 2.10 because of symmetry About zero the positive critical values 2.10 All right, so we have our critical values. They ask for a positive critical value or a negative one See your negative 2.1 or 2.1 Now, where does this test statistic lie? Where does point seven six four seven lie? Does it lie in the shaded rejection regions or outside of them? Well point seven six four seven Actually lies outside of the rejection region. It is not contained within the rejection or critical regions at all It's in the center part the non shaded part of the bell curve. So We fail To reject the null hypothesis you would get the same thing even if you did the p-value approach You would fail to reject the null hypothesis so fail To reject so we're failing to reject our claim. So there's not sufficient evidence to reject our claim There is not sufficient evidence to warrant rejection of the claim that the mean weight of all green mms is equal to 0.8 535 So what I did was take an alternative spin on things here. I used instead of using the p-value alpha comparison approach I used the critical value test statistic comparison approach Since my test statistic was outside of the critical or rejection regions I Failed to reject the null hypothesis So it's up to you to decide. Do you like the p-value alpha comparison approach the hypothesis testing? Or do you like this critical value test statistic approach? I mean I have my own personal preference, but and I have a feeling I know what yours is too But anyway, I just wanted to give you a different take on how a hypothesis test can be Conducted other than that. I appreciate your time. Thanks for watching


Hello and welcome. My name is Steven Fluen. I'm a developer advocate on the Angular team here at Google. My job is really fun because I get to help developers be successful with Angular and I get to spend a lot of time listening and engaging with the community so we can reflect your needs onto the team. One of the things that we've learned, having worked with a lot of developers across the world, is that staying up to date is really, really important. And so today's talk is all about how to keep your application as fast as possible and as fresh as possible using Angular. We're going to be diving into some of the best practices that you should be following as an application developer and we'll take a look at live code and see how you could actually go in and debug and build your application out. So let's actually get started. So if we take a look at what we've got here, this is a application that I've built using the Angular CLI. So it's a very, very basic application. This should look very, very familiar. It's basically we ran ng new and then we installed something called Angular material. And so if you take a look at the app component, I've put in an app dashboard and so if we ran a command like ng serve, what we would see is a normal dashboard of an application that's coming from Angular material. So we've got a few dependencies installed. We've got a few other things installed and all of that should just be coming to you kind of automatically. So here we go. This is just the default blank dashboard. And so even though we haven't written a ton of code, we've got an application up and running and it's pulling in a ton of code, right? We're pulling in the features of Angular necessary for these animations, for these menus, for these dialogues, as well as for all of this content around this dashboard that a user could interact with and engage with. And so the first thing I want to do in order to make my application fast as possible is I really want to understand my application. And so we're going to make a couple changes within our build configuration in the Angular.json file. So what we're going to do is we're going to find the Angular.json file. You're going to find this directly in the root of your application. And what we're going to do is we're going to find in the production build settings, we're going to change two settings here. We're going to say source map. I'm going to change that from false to true, as well as in our named chunks, we're going to turn that onto true. What source map does is this will actually take my application and map all of the generated JavaScript that comes out of the build and map it back into the code that that JavaScript came from. And so if some of the generated code came from Angular material, we'll see that. If it came from Angular itself, we'll see that. And we'll even see things like the generated JavaScript being mapped back to my HTML and into the application code that I'm writing for all of the components that I'm creating. So source maps are a really great way for you to understand what's going on in your application and the relationship between what happens in the code you write in the IDE and the code that's being delivered to your users. And so there's a lot of steps that we end up taking along that way, right? There's the Angular compiler that takes that HTML and turns it into JavaScript. But there's also other steps that we do like optimizations where we'll change some of the property names. You've got bundling so that we get all of this JavaScript coming down as a single kind of cohesive bundle that makes sense to browsers. And so source map allows us to follow that path, follow that process and give us really good insights. And so what we can do is having made these two changes, we can actually now go and run a ng build dash dash prod. And what that will do is that will create a production build of our application, which is normally what you ship down to browsers. But because we've turned on source maps and we've turned on name chunks, we'll actually see the JavaScript and be able to analyze those chunks. And so we're also going to be using another tool today called source map explorer.  But what we on the Angular team actually really strongly recommend is you only use source map explorer because there are tools out there like webpack bundle analyzer that categorically misrecognize some of those steps within our process. And so we've done that production build. And now whenever you want to actually take a look at what a source map looks like, we can just run source map explorer. If you don't have this installed, you can just install it globally, yarn global add source map explorer, or you can install it local to your project, whichever makes sense to you, just go ahead and do that. And what we'll do is we'll run source map explorer. And we will pass it in the JavaScript file that we want to analyze. And so we can see that we've got our disk folder here. And we're going to look at the ES 2015 version of our JavaScript. So if we run that, it's going to pop up in a web browser, and we're going to see this visual interactive story about our application. So we can see our overall bundle size in terms of minified but not compressed JavaScript. So it'll actually be a little bit smaller when it goes over the network. We have about 452 kilobytes of application. And what's really, really helpful here is that you can see where that bundle size is coming from. So you can see animations is 64 kilobytes. Angular material is about 56 kilobytes. We've got things like HTTP, where we might actually need these things. And we might not even know that they're in our bundle. We might have forgotten it some point along the way. So you can see I'm pulling in forms and HTTP. If we actually go into our application, we now that we know that those things are there, we can say, hey, I don't actually need that for this dashboard. If we look at the content that I'm showing here, there's no form data here. There's no data coming from the internet. And I can go into my app module and I could pull those out. So I'll just comment these out because we don't need HTTP or forms. And what should happen is when I do my next production bundle, all of that code is going to be left out. And so we're going to be able to see that our bundle size will come down from around 450 kb to a little bit less than that, which is really, really nice. And it should actually be exactly leaving out the size of the HTTP bundle and the size of the forms bundle. And so source maps are one of the best tools in your toolbox. And we really recommend that every developer be using source map for using this on a regular basis to understand your application, especially when you're doing any sort of performance optimization. Now, let's say that you are looking at your bundle and you're saying it's still too big, but I need all of those features. I need all of those capabilities. Fortunately, the Angular CLI offers a lot of really smart capabilities. One of those capabilities is being able to take an application and build out lazy loaded modules. And so let's actually go ahead and do this.  And I'm going to give it a root module that it's going to connect back to. So what we're going to do is we're going to create a separate part of our application where we can pull in the features that we need and just leave all of that code outside of the main bundle. And so we're going to generate a module here, and I'll just link it back to the module known as app module, which is the root of my application. And now I'm going to give it a route. And so what this does is it automatically wires up this module to be lazy loaded whenever a user hits that route. And so we'll just make, for example, an about page. And so what this is going to do, it's going to generate a module called about module. It's going to be able to route to it. And then it's going to give me an about component. So we can see all of that in our source code. So let's just close all these files. And we're going to see it created a new about folder with our new module and our new code. And so if we do another production build, what we'll actually see, because we turned on named chunks, we'll actually get out now, not only a main chunk, a main module, we're also going to get out an about module, we can see and independently verify the size of that module and independently verify what the dependencies of that module are doing to the overall bundle size of our application. And so what you'll see is that by default, an Angular module is really, really small. It's very, very thin. It doesn't add a ton of bundle size to your application. It's almost always the dependencies that you are pulling in as a developer, the features that you are reaching out for. And what you will do was intelligently based on the where you do the imports will lazy load and split that code. So if you remember, we pulled HP and forms out of our main chunk, we can actually now pull that in. And so you can see we've generated a, let's just clear this out. Let's take a look in our disc folder here. You can see we've got a main chunk. And now we've got this nice new about module. And so you can see in the ES 2015 version, our about module is only about 1.1 K of code. So it's just that about component because it doesn't have any dependencies. But if we add back in more dependencies into that chunk, if we wanted to pull in, for example, Angular material into that about module, then it's going to pull in that code. But it's going to do it very, very intelligently.  So if you haven't set up lazy loading before, it's really, really easy just generate a new module with that command that I showed where we generate a module. And we hang it onto the routing structure of our application. All right. Next up, I want to talk a little bit about what happens after we build an application, after we've been building it out, and we've added more and more features. It's very, very easy to backslide. One of the things that the Chrome team has seen consistently is that even applications spend a ton of time building great performance into their apps tend to backslide because we as developers, we want to add more features. We want to push more functionality to our users, and that often comes with more dependencies, which sometimes we don't realize is negatively affecting our bundle size. And so one of the features that's built into the Angular CLI is called bundle budgets. And so again, if we go back into our Angular JSON, so we'll just search for that, we can see this nice little budgets section. And what this does is it allows you to set several different budgets for your application. And by default, we give you two out of the box. We give you an initial budget. So this is the JavaScript that it takes to load the initial page of your application. So right now, we are warning at two megabytes. So we'll see a warning as part of our build if our application is over two megabytes. And our build will actually error out if it's more than five megabytes. And so those are very, very conservative defaults. We recommend you turn those as small as you can to really just give yourself a knowledge of when you're increasing your bundle size. It's a conscious choice rather than an accident. You'll see we also have a few other types of budgets, including any component style. So what this says is that any scoped styles to a component, we want to keep those under six kilobytes and we are going to error out if they become above 10 kilobytes. And there's a few more that you can see if you just take a look in your ID, you've got all scripts. So that's just what is the total sum of all the scripts in my application, any scripts or any individual script should be bigger than this, the whole bundle overall, all those sorts of things. So we've got a whole bunch of different features that allow you to really take control and understand and prevent bundle size increases. So that's a really, really helpful tool. So those are some of the top things that you should be doing to keep your application as fast as possible. But one of the best things you can do that doesn't take a lot of work is actually staying up to date with Angular. So if we jump back to the terminal here, what we'll see is that I actually created this Angular application on an old version of Angular. It is running version eight. So version eight is not the latest version, version nine as of this filming is the latest version and version 10 is coming out. But it's always the same. So if you are on an out of date version of Angular, your bundle size is going to be bigger and slower than it needs to be. Because what happens is over time, every time we do a release, the Angular team is looking at what can we do better. With the release of version eight, we actually made a huge step forward by automatically doing something called differential loading where because we have this opinionated control of the entire tool chain, we understand how to make your production bundles. And so what we did is we said, hey, modern browsers are capable of loading JavaScript differently than legacy browsers that don't support something called ES modules. And so using that knowledge, you can actually conditionally force modern browsers to load modern JavaScript and legacy browsers to load legacy JavaScript. And this is a really nice schism that allows you to have two bundles that really gives you the best of both worlds, where you can ship the smallest, fastest JavaScript to modern browsers that support the most recent capabilities, like classes, like modules, all those sorts of things. And you can leave an older legacy bundle for browsers that don't have that kind of support. And so we actually did this out of the box by default. So you notice when we were doing those builds, we were actually getting the two JavaScript bundles for each of the files. So we had an about module 2015 and we had an about module ES five. And so again, this is one of the changes that the Angular team did behind the scenes without having to make you change any of the code in your application. And this is something we do every single release. And so what we're going to do now is we're going to make our application as fresh as possible. So we're going to update to the latest version of Angular. And we're going to automatically get more improvements to our bundle size. This is something that just happens every time you keep your application up to date using Angular. And so we're going to again use the ng CLI command. And we're going to use ng update. And we're going to update our application in a couple of stages. First, we're going to update the Angular core packages. So core and the core package, as well as the CLI package. And then what we're going to do is we're going to go and update our dependencies. So we're going to do as two steps to make sure that we don't accidentally enter a mistake or an error where application is no longer compatible with one of those dependencies. So let's go ahead and get this started. So I'm going to run ng update. And what we're going to do is we're going to pass it Angular CLI and Angular core. Now, if you were on an even older version, what we do is we recommend that you go one version at a time just so we can apply things cleanly. And if you want to do that, for example, if you were on version six, you want to go to version seven, you can just say at seven. And that will just do that for you. But we're going to go all the way from version eight up to version nine, which is the latest. So I'm going to run this command. And theoretically, things should work. There's a few places where this might fail. If your repository isn't clean, then what should happen is we're going to throw this warning, which is what we're seeing right now. Repository is not clean. Please commit. Because what we want is we want you to have a very clean history so that you actually know what the Angular update process did. Because this isn't like a normal ng update where we're just modifying the node modules of your project. We're actually making changes to your application so that you stay compatible with Angular. And the reason we're able to do this is because the Angular team at Google, we have thousands of projects across Google that are not run by our team that are using Angular. And it's actually, according to Google policy, our responsibility for keeping those applications working as we make breaking changes to Angular. And so the only way that we could scale this at Google is to build really great automation and really great tooling. And so what we did is we baked that same sort of tooling into the public world into this ng update command. So whenever we need to change a method name, whenever we need to deprecate something, we're going to try and update your application as best we can. And so that's why we always make sure that you want to have a clean history. So we'll just get add everything. Commit that. And now we should be able to run our update command. So again, what's happening behind the scenes is it's going to be downloading and installing the latest version of Angular CLI. And then it's going to be updating the packages in my application and changing my code where needed. And so if there's any sort of migrations, what should happen is while you're doing the update process, it's going to report what migrations it's doing. So you can see in your workspace migration. So it made a few changes to the workspace layout. So you can see it updated my Angular JSON fellow to my tsconfig.app. It updated the package JSON. So it's making all of these migrations, even ones that don't really have any changes to my app. It's still double-checking all those things so that we know that my application is going to keep working. Now, there's a couple other places that you can look for the latest information. You'll notice here at the very, very bottom of the update, it actually says, for more information, please see this link. And so we actually have guides on what changes we're making behind the scenes with every version of Angular. So you can know about things like deprecations. You can know about things like removals and changes to the way that APIs work. The other one that I want to point you out to would be update.angular.io. So behind the scenes when you ran ng update, we made a lot of changes to your project. And so if you actually wanted to see what you need to do, you can just go to the update guide, you can say, show me how to update. And we'll say, oh, make sure you're on the latest version here, make sure you're using this version of Node. It walks you through the changes that are going to affect you as a developer. And you can even tune this based on the number and amount of features and the depth and complexity of your usage of Angular. Because most applications don't need to care about all the changes we're making out of the hood. But let's say you have a large application. Maybe you have several hundred components. You have component libraries. You're using things like Universal. You can check these boxes. And what we'll do is it will show you all of the information about the update, all of the changes we're making behind the scenes so you can have a full, complete understanding of what's going on. The other way you can do it is if you just take a look at the Git history, you can now go in and see what all the changes we made were. So for example, when we moved to version nine, we turned on ahead of time compilation by default. So that's going to make your build a lot faster. You can see that we've installed all of the dependencies and not just on Angular. We've also installed things like RxJS to the latest version. We've updated your components so that they actually continue working as we make changes to Angular. So this is really, really powerful. And then we can actually do a test to see if this works. So let's just run on ng serve. And we can say, yes, let's let Google Analytics track some of our CLI usage anonymously. And what will happen is when we return back to the browser window, we're going to get the latest version of Angular and our app is generally just going to keep working. And then the way that this really affects you is not only keeping you up to date as a developer, making sure you're using best practices, but again, it's also going to improve the performance of your application. One of the things that you're going to see is that every time we make an update to Angular, we're trying to look for ways to make Angular more tree-shakeable, to make your build system better. And so there's lots of experimentation, lots of ideation going on there because the state of bundlers in JavaScript are not static. Webpack keeps getting better, rollup keeps getting better, cursor keeps getting better. And these tools are changing and they're evolving and the way that they relate to each other is changing. And so what we do is, as the Angular team, we're trying to stay on top of that for you. And so let's go ahead and refresh. And if we take a look in the DevTools, we should see we are now on the latest version of Angular. So 919 at the writing. But whenever you use ng update, it's just going to move you to the latest version. It's going to do that automatically for you so that you are staying up to date, staying fresh, staying fast. So once you've updated Angular and you've updated the CLI by core and come, now what I'm going to do is I'm going to go and update all of the other packages. So if you take a look, for example, we did not in our package, Jason, we didn't update the CDK or we didn't update Angular material. And so we're going to do one more ng update command to update Angular material and Angular CDK. You can do this with any of your dependencies. A lot of dependencies are starting to support these automatic migrations. This is something we've been pushing very hard for in the ecosystem. All right, let's just run that ng update Angular material and Angular CDK command again. And again, it's fetching the latest version of those packages. It's updating their dependencies in your package, Jason. And then it's going to execute any migrations that you need to be on the latest version. And I think we're going to run ng serve one last time and we will see that our entire application kept on working. And our bundle size should have gotten a little bit better. And again, it's doing a little bit of compiling ahead of time. Generally, this is a temporary thing that you're going to see with Ivy and with version nine, is that we do this extra compilation. That's really to offer the latest version of Angular and the latest features of Angular while still staying compatible with the rest of the ecosystem. So this is just a extra compilation step that Angular team does to optimize things. All right, as soon as this compilation is complete, what we're going to see is we're going to be on the latest version of Angular. And again, we updated the package, Jason. So just all of the dependencies, including removing things like HammerJS, and our application should just keep working. Yep, there it is. We have a great dashboard, just like we had before right in the beginning, everything works, everything animates. We're now in the latest version of Angular. We're now in the latest version of Material in the CDK. And our application is as fast as we can be because we're budgeting. We're making sure that we're understanding our application, making sure it doesn't grow over time. We're analyzing the application bundle size with source maps. And we're doing things like laser loading so that we only make users pay for the features that they're using at the current time. That's going to be it for us. Thank you so much for watching and have a wonderful day.