 We are continuing on data smoothing, we took the aluminum tensile test data and we smooth on data ourselves and calculated the measures like modulus and strength and so on. But it is also possible to smoothen the data using some of the existing libraries and Erisar's book gives lots of these details. So in this session we are going to take two of those commands that is given libraries that are given in Erisar's textbook, we are going to use them and we are going to use those function calls to do the smoothing of the data on aluminum and I will show you the difference between the two and how they differ in terms of how they smoothen the data out. So the first one let us read the data and use the library tidyverse and DS labs and you have to give a measure called span and this is equivalent to the, this is like the bin that we gave earlier and in this case what is done is that you take the data and you try to fit them, you split the data into many different smaller portions and you try to fit these given data and using that and you do a box average and you get the smoothened version here. So let us run this and so here is the data that is given and it is better if we zoom in. So here is the data that is plotted and here is our smoothened curve that is plotted but if you see in these regions, this smoothing actually also follows these noise. So if you just look at the fitted curve, let us, so you will see that there are these small bumps that you see even in the fitted curve. So it is not strictly for example here, it is not really that smooth. So one of the things that you can change is by changing these parameters you can try to get better fit. There is also this other way which is L-O-E-S-S which is used to do the fitting which will give you much more smoother fit and this is also from Irizar's book and this is also there in Tidyverse and DS Labs library and so let us do this fitting. So we have got the QQ norm to show if it is a straight line and so this is the residuals it is really not that normal and of course we can. So this is the linear portion that we are fitting and these are the data points and that is the fit and summary fit will tell you the coefficients that you get. So here also you get 683 like we pointed out earlier so the stress is in MPA the strain is in percentage so 683 would be 683 into 100 MPA. So that will be 68305.73 MPA that will be 68.3 GPA and that is the Young's modulus for aluminum that is known. So we are getting the right number and if you want to get the error in that quantity so of course this is 200 so it is 683 688.3 plus or minus 0.2 so that is the error that we are getting in our estimate of the modulus. Of course we should also plot the other one smooth and data in this case and you can see that now all these different bumps have sort of disappeared and this is a much better smooth and data and that is what you also see here. So this is the one where you see the wiggles but here is one where you see that all the wiggles are evened out and you get the proper curve and so this fittings also give you the same modulus namely 68.3 and in the case of brass data if you do you will get about 100 GPA as the Young's modulus of the brass sample on which the tests are conducted. So these are different ways of doing smoothing and like we have mentioned it is a good idea to go to Erie's book and learn more about smoothing it is useful for analysis of data it also leads you naturally to machine learning algorithms and we have also been indicating how manual intervention is needed the way we are doing the analysis but the machines already do without any manual intervention some of these calculations and give you the parameters. So how do they optimize these magic numbers like how many bins over which you have to average and things like that or is there a way that you can write a program which will do it automatically and from the different fits that it gets or different parameters it evaluates it will decide what is the optimal parameter using which it has to calculate these quantities and report it to you. So that is slightly more involved exercise but it is an interesting and useful exercise for you to do. Thank you.