We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Introduction to Programming for Business Analytics - Exercise 6: Libraries and Modules

00:00

Formal Metadata

Title
Introduction to Programming for Business Analytics - Exercise 6: Libraries and Modules
Title of Series
Number of Parts
22
Author
License
CC Attribution 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language
Producer
Computer animationLecture/Conference
Computer animationLecture/Conference
Computer animationLecture/Conference
Computer animation
Lecture/ConferenceComputer animation
Lecture/Conference
Computer animation
Computer animation
Lecture/Conference
Computer animation
Computer animation
Computer animation
Computer animation
Lecture/ConferenceComputer animation
Transcript: English(auto-generated)
Hi, welcome to the sixth exercise solution video for the Introduction to Programming for Business Analytics course. This video we're going to have a look at libraries and modules.
As always, please try to solve all of the tasks by yourself before you watch the portion of the video that talks about the respective task. Because if you just watched the video without trying to solve the task yourself, you will not really learn anything and it will not help you to learn how to program and to get
a good grade in the final exam. With that said, let's get started with task one basic concepts. First question is give two examples for a Julia module. You've seen plenty of examples in the lecture and correct answers might include the module
random, the module statistics or the module xlss. Question two, what's the difference between installing a module and loading a module? Again, you've seen this in the lecture.
When you install the module, you use the Julia package manager to download the module to your local computer and you only have to do this once for your Julia installation. On the other hand, loading a module means that the module's data types and functions
are included in the scope of the current Julia interpreter that's currently running. That can be your REPL or your Jupyter notebooks kernel and you have to load the module every time you restart the REPL or you restart the kernel of the notebook.
Third question, write a piece of Julia that installs a module. For this I will create a new cell and first thing I have to do is using PKG. Which is the Julia package manager that is in itself a module and now I have to call the function PKG.add and then I can provide the name of the module as a string.
In this case I will install the module xlsx like that. Which we will use later in the exercise.
Looks like the module is successfully installed. And now the next question is to write a line of Julia that loads a module and this would be using xlsx in this case and now we've loaded the module xlsx.
Question five, name a difference between modules in the Julia standard library and other modules The most important difference is that the modules in the Julia standard library you never have to install them because they already come with your Julia installation while other modules have to be installed manually.
Question six, where can you find information on modules in the Julia standard library? That would be the official Julia documentation. And question seven, where can you find information on other modules? There is not really one right answer to this because it kind of depends on the module.
Some of them have their own website and most of them are on GitHub and you kind of have to figure it out for every module where the best version of the documentation can be found. Task two asks us to write a Julia function called describe that takes its input a vector
x of numbers and returns a dictionary containing the length, minimum, maximum, mean, standard deviation and median of x and now we are given this example and then the description also says that we should use the package statistics from the Julia standard library to calculate
the mean median and standard deviation right and there's this helpful link to the documentation where you can find all the functions in the package and you can use them to you can use
the documentation to figure out which function you need to compute the mean median and standard deviation respectively. Okay so let's get started. First thing we have to do is to load the package statistics. Now we can get started with our function header for the function describe which takes its
input a vector x of numbers so that's our only parameter and we're asked to return a dictionary so let's just create a let's just create an empty dictionary alright now the
dictionary should contain the length minimum maximum and so on and for each of these we can just put one line into our function where we add the respective the respective entry
to our dictionary so first entry we associate with the key length and we associate the length of our vector so that would be length of x and let's just try out what we have so far by calling our function describe with this example input here all right and as you can see we have a
dictionary with just one entry length is associated with the value five all right for the other
entries we just go on in a similar fashion so minimum and the maximum and now we get started
with the statistics functions and you can see in the documentation that there is a function called
mean which calculates the mean furthermore there is a function called median which calculates the median and there is a function called STD which calculates the standard deviation of x alright
okay so as we can see we have put in a lecture a vector of length 5 minimum value is 1 maximum value is 5 median is 3 mean is also 3 and our standard deviation is 1.58 okay and with that
we are done with task 2 task 3 asks us to write a function that simulates a dice roll from the board game settlers of katan so let's get start with our function header as you know a dice roll
is just a sample from a probability distribution and in this case it's a uniform probability distribution over the discrete values 1 to 6 and we can generate such a sample in Julia using the
function rant from the standard library and this function helpfully just accepts a range out of which it will draw a sample with uniform probability and let's see what this looks
like when we test it alright so we've rolled a 2 we've rolled a 1 we've rolled a 4 and so on so this is our first our first die right so let's call this d1 but we want to roll two dice so
let's put another one d2 which is just the same and we add the results and then we're done so we
throw the three we've rolled an eight we've rolled a five we've rolled a five another five eight six seven six nine and so on yeah so we're done with this function which simulates the katan dice roll and the second function we are supposed to write is called dice roll dictionary now it has
one parameter M alright and returns a dictionary so let's create a rent a an empty dictionary which we return okay your function should call katan roll n times and should store all results in a
dictionary the dictionary should associate the rolled numbers as the keys to the number of times this specific number was rolled as the values for example if the number two was rolled once and the number three was rolled twice dictionary would be key two is associated with the value one
and key three is associated with the value two okay let's get started to call our function katan roll n times we just can use a for loop okay so now we call the function n times and we
have to store the results in a dictionary now at the dictionary we have already created it's called result and now we have to check if we have we already have stored for instance if this if this
dice roll is a seven we have to check if there's already a seven and a key for the value seven sorry if there is already a key seven in the dictionary result we can do this by checking
if d in keys of result and in this case we can just add one to the specific the specific value in the dictionary result and if this isn't the case then we have to we have to create the
entry first and we can actually write this in a quite succinct way if we just invert the if condition here so if we just negate this boolean condition and move this at operation to after the
if branch and here in this if branch where the key is not in the dictionary yet we just we just
put a zero into the dictionary okay and with this we we add one to the entry through the value in the dictionary every time we've rolled a we have rolled the number that is the key of the respective
value let's see what the result looks like if we test test the function okay so you can see it's
quite a short dictionary and the values should add up to 10 so 4 plus 2 is 6 plus 2 is 8 9 10 that checks out let's do it with a higher n okay as you can see the dictionary looks as we would
expect it to look like we have as our keys we have the we have the values that we roll with the function katan roll and on the right side the values they represent the number of times which which we wrote the respective sum of the dice all right after the third function which says to test
your two functions supply the dictionary returned by dice for dictionary as the argument to the following function print dice for dictionary this function takes a dictionary and prints it
as a sorted list of relative frequencies so we just call this function print dice for dictionary with a dictionary that has been created by our function dice for dictionary and then and then
once we have our actually defined the function we get this result which prints the the left hand side of the dictionary the keys in the ascending order and on the right hand side we have the relative frequency of the respective key of the respective dice roll so as you can see the number
seven is has a probability of 17 percent in our in our sample numbers five and sorry number six and eight have probabilities of 13 and 15 percent and it and the probability is decreasing as we go
to the numbers which are higher or smaller than seven and this makes a lot of sense because there are much more key as much more die combinations for the number seven and then there are for the
other numbers yeah if you if you don't think it makes sense then just draw a table on a piece of paper where you map out the different combinations of dice and you will see that this makes a lot of sense and with that we're done with the settlers of Catan task and we can continue with task four
which is to write your own median mean standard deviation and median for this task we first given this cell which creates a vector of random numbers which is assigned to the variable R and then calls
our function describe which we've implemented in an earlier task on this vector of random numbers let's see what this looks like okay so the the cell has created a vector with 88 numbers of which
14 is the minimum 82 is the maximum there is a median at 50.5 the mean is 47.94 and the standard deviation is around 20 now we're asked to write three Julia functions each function should take a vector of numbers X as its input and the first function should return the arithmetic mean the
second function should return the sample standard deviation and the third function should return the median of X all right and then we're given these hints here which explain how the mean standard deviation and median are defined exactly so let's get started with the first function which asks us
to write the mean let's call it my mean as the task description says it has one parameter called X and we have to calculate the mean now and the mean of of a vector X is just the sum of its
numbers divided by its length okay and we can test our function on the random vector R now which we've created in the previous and the previous cell the package statistics has calculated a
mean of 47.94 for us and as you can see this is exactly the same mean that we get with this implementation that we made ourselves it's just rounded a little differently but this is due to
this is due to numerical reasons and doesn't really indicate that we've made something that is incorrect so second function the standard deviation let's call this my STD which stands
for standard deviation of course and we're given this helpful formula here which is how you generally calculate the sample standard deviation yeah so let's break this down at the outermost square root of something and it's a square root of a product on the left hand side of the product we
have this fraction and on the right hand side of the product we have this sum okay so we can basically start our function from the bottom and go from from the bottom of the code which is the outermost part of the of the formula this is the part we have to calculate at the end right and
then we can go to the more inner parts of the formula which is the parts we have to calculate first in our code so let's get started we have we have to return a square root of something and
for this we can just use the function square root which is in the Julia standard library and we have to calculate the square root of a product in which we multiply this fraction with this sum and instead of multiplying it we can just divide the sum we can just divide that by n minus one so we will
have something something divided by n minus one here and this something will be this will be this sum here and let's just say that for the sum we will eventually start at in a variable we call s maybe s is not a good choice because that's given here as the m is the name for the standard
deviation so let's let's choose a different name maybe Sigma because that's the Greek letter which indicates the sum all right so how do we translate this summation to Julia code well it's actually
very simple you see this summation is actually almost exactly the same as a for loop and the for loop starts and the follow present index variable index variable is called I and I starts at index 1 and goes up to index n and for every for every iteration of the for loop we calculate
the inner part of the summation here so X I minus X mean and then we square that and across all of the iterations we just add all the results that we calculate in the respective iterations and we
add all of them into just one variable so to add all of them we can use a variable which we initialize with 0 every time we encounter such a summation and then we have to follow index variable I which goes from 1 to n just as is indicated in the mathematical formula and every
time we have to make this calculation so that would be X I minus X mean to the power of 2 and then we add this to Sigma and instead of writing X I like this we can just use the bracket operator
on our vector X we which will receive as the argument and X mean is just the mean over the
vector X and we can calculate that outside of our loop by calling for instance the function my mean of X okay and with that we're done with the standard deviation function I believe let's try this out again we can use the vector R to to test the function let's see what the statistics package
calculated so it was twenty point six seven one and our own implementation now says and not defined now that makes sense because n is indeed not defined we can fix that by defining n as the
length of X and now we get the same result twenty point six seven one okay so looks like our standard deviation implementation is correct let's get started with the third function which which were
asked to calculate the median of the vector X now to do this let's first look at the very simple case where the where X and has uneven length for let's look at the example where X is equal to the
vector one two three as you know the median is basically the number in the middle of the sorted
vector in this case it's just the number two so all we have to do is figure out how what is the index of the number in the middle and then we can just return that and we can figure this out by using the function div which divides two numbers and discards the remainder right so we can just
return the value at the index div where we divide the length of X by two right let's let's see if
this works with our example nope doesn't work why does it not work yeah probably we have to add one
okay now it works let's try with a different example okay works as well yes and again forest
the median so this seems to give us a correct result but of course now we assume that the vector has uneven length and also that it is sorted already but the vector doesn't have to be sorted and the numbers can be in any order so to fix this we can sort the vector first
using the built-in function sort and now it should also work with a vector that is not
sorted we should still receive four as the answer yes okay that that works cool but we
still have a problem and the problem is that this definition of the median that is the number in the middle it doesn't really make too much sense if our vector has even length because for a
vector with even length there just is no number in the middle right and if for example if we have the vector 1 7 what's the median there is no number in the middle and 7 certainly isn't the right answer or at least it's not a very intuitive answer and most of the time most definitions of
the median they say that for a vector of even length the median is the number which is the arithmetic mean of the two middle numbers so in this case it would be the arithmetic mean of 1 and 7 so let's let's build this into our function here let's check if the if the length of the
vector is even I think there is a built-in Julia function for that let's see if we can figure out
what it is called it's not even but yeah it's even is even works that does exactly what we want so if is even length of X and for this case we have to come up with a different with a different implementation
but one step that we also have to do is to sort the vector so we can pull that before
our if branch and now we have to calculate the arithmetic mean of something so for this we can
use we could use our function my mean but the function my mean expects the input to be a vector and we don't really have a vector here yet so let's see if we can actually use that so what
we want to calculate is some mean over the first of the two numbers in the middle so the first of the two numbers would be this right and the second of the two numbers now that would be that would be
this with a plus one edit here and we can actually make this a vector by using slicing but first
let's pull out a variable here that which has this value to make the code a little bit easier to read so maybe we can call this middle or maybe just mid for short because we have to use it a
lot so this would be mid this would be mid this is also mid okay now we can slice from middle to mid plus one now we can use our function my mean let's see if this produces the correct result so
what we expect is the arithmetic mean over one and seven so that's the sum of a one and seven
which is eight divided by the length of the vector which is two so the result should be four yes and the result is indeed four and the result should not change if we add some other values around it yes and the result is still four let's see if we still get the same result of the vectors unsorted
yes and the result is still four okay now let's compare against our random vector R so the median
calculated by the statistics library was fifty point five the vector had the vector had even length let's see what we get fifty point five all right so our median function seems to be correct and with that we're done with task four in task five we will begin to work with xlsx files using
the xlsx module and in moodle you can find this example xlsx file and to make it easy to work with the best way is to put the file into the same directory on your computer as your Jupyter
notebook you can check if this is the case by executing this cell as you can see on my computer I have it in the same directory so now we can get started by installing and loading the xlsx package
as always if you install a package you have to first load the package manager which is itself a package and then you use the package managers function at to install the package
alright in my case it says no changes because the package was already installed and now I can load the package using the command using all right and I have now loaded the package the next part of the
task is to write a function that takes as input an xlsx dot xlsx file and prints a list of the names of the sheets in the file one sheet per line okay let's get started by trying to produce this xlsx file from the file that is located on the hard drive to do this I find it necessary to
look at the documentation for the package xlsx you can also have a look at the lecture this is the documentation you can find this via your favorite search engine and we want to have a
look at the API reference on the left side and then we can see that there is a function called read xlsx which gives us an xlsx file so this is the function we want to want to use so that would
be read xlsx now we give it the file path so in our case that's german.xlsx to direct it to the xlsx file that contains the credit data let's see what this gives us reads not defined okay
we have to prepend it with with the package name and now it tells us that it has loaded a file with three worksheets and the sheets are called 2012 2013 and 2014 so this is already quite close to
what we want let's assign this to a variable we call sheets and now we have to write a function that prints a list of just the sheets so let's maybe call this print sheet names let's have another look at the documentation which tells us that we can use the function
sheet names which returns a vector with worksheet names for this workbook so let's use that let's first see what it returns print sheet name is not defined yeah that's to be expected
okay now we have this vector 2012 13 and 14 and now all we have to do is print the entries line by line so you can use a for loop for this well now there we have it the names of the worksheets
one per line the next sub task is to write a function called print sheet and column list that
takes its input another xlsx dot xlsx file and prints a list of the names of the sheets in the file as well as of the columns in each sheet for each column print its header the task says which
is the first row in the xlsx file and the data type of the first element of the data vector then we're given this example for how this should look like and and the task description also says that it might help you to study the documentation for the function get table okay so let's have a look
at this function get table there we have it and the function has a very long description let's just look at the examples so in this example they open they open the file with the different syntax
from what we have used and then they call this function xlsx dot get table on one sheet in their excel file which they select using this bracket operator here and they give the name of the sheet
in this case the sheet is called my sheet right so let's let's try this ourselves so we write a function the function is called print sheet and column list it takes the excel sheets as its input
yeah and now we can again we want to do some work for every sheet in our files so we'll use a loop
to iterate over the sheet names and then let's see what gets table gives us
so this is just a reproduction of what we saw in the example in the documentation sheet name is not defined here because I put it with an underscore okay whoa okay that's a lot yeah
okay it's a lot of output let's see what the documentation says about the output okay so it returns tabular data from a spreadsheet as a tuple data column labels okay that's helpful
instead of printing all of it we can just first use such a decomposing tuple assignment to to decompose the data at the and the column names column labels they call it and let's
just print the column names let's see what this gives us all right as we can see we have this vector id, h, sex, job, housing, saving accounts and so on so that's the that is the column names
of our xlsx file german.xlsx all right so we actually almost there and we all we have almost reached the output all we have to do is to print this line by line so and to prepend it with the
sheet name. The sheet name should be followed by a column and we want an indentation of two spaces before the column name are we missing an end okay see what we have all right yeah that looks
almost like what we want the only thing we're missing is the type that goes into the parentheses okay and to figure out the type we have to use the function typeof right
okay what do we provide us the argument for typeof the task description says the
data type of the first element of the data vector data vectors this so its first element would be data one let's see what the output is okay it's always a vector of any that does not
seem like what we want let's have a just have a look at the raw vector so what we have is a vector of vectors actually okay size now it says 10 okay so 10 is the oh right right we're
iterating over column names but data is the data for the entire sheet so we first have to select the data for the column name we're looking at okay yeah we have to do this with an index variable so
for this we can use the function numerate but it's probably more comprehensive which if we just use the index variable and go from one to length of column names instead of just looking at data you
want to look at data one sorry data of I and then the first element and instead of just the column name we can select the column name using this assignment okay this should hopefully do the
trick yes okay that looks that looks good okay so we have 10 columns and every of our three worksheets some of them have type int64 and some of them have type string right this looks like what we
want the next sub task asks us to write a function called print sheet and column list filtered which
behaves just like print sheet and column list but only prints those columns whose name contains a string which our function receives as an argument okay so the first parameter of our function is still the same as in the previous function xlsx sheets but now we need another parameter we can
call this key phrase which basically acts as a acts as a filter and we only want the columns whose name contains this this string here this string key phrase otherwise we do exactly the same as the previous function so why don't we copy and paste the code of the previous function
let's fix the indentation all right and before we print a column we have to include an if statement now and the if statement should check if key phrase is in column name and this we could just
use the in operator if key phrase and column name were strings but they aren't because the xlsx library returns the column names as values of the type symbol and because of this we can use
this other expression which is given in the task description so key phrase and then we convert the column name to a string and if this is the case then we print the column name all right to test
this we have to come up with a key phrase let's see what columns we have so yeah maybe we can use
account and account should give us and just the column saving accounts and checking account yes
that's what we want let's try different key phrase maybe amount and this gives us just the columns which have amount in their name all right so now we have to combine the function that we just wrote
with the function describe and print a description for every column that we that we print right for this we can I think just copy this function here and then modify it a bit first it should be called
describe matching columns we still print the name of the sheet then we print the the column
name but without the type and then we print the description
let's see what this gives us now when we choose the key phrase we have to be careful that we only
include columns which contain numeric data because our function describe it expects a
vector of numbers if we put in a vector of strings we will receive an error let's see what we get okay so we have the name of the sheet and the example includes it without the column so I will remove that then we get the column name and now we have our description in this kind of raw
format let's make this a little more refined we can just iterate over the key value pairs in the
description and we just print the key and the value let's see what this gives us all right this
is almost what we want we have everything in one line so all we have to include is the string parts around this there we are so as we can see the credit amount in the three years that I included
in the table is very similar on first sight because it has the same mean median the minimum and maximum are the same also the length and the standard deviation is also very similar and with that we are done with the xlsx task task 6 is all about the dates library so Julia has a dates
library which is a module that this task description asks us to look for so let's do just that okay so you can see it's documented on the official docs Julia link org website which
is always a good task sorry good sign and the description is very comprehensive so let's see
what we actually have to do we have to write a Julia function day of week that returns the day of the week of a given date the function should have one parameter is string that represents the
date in German formatting and we can call it German date then and should return a string that contains the day of the week for example the expression day of week zero four dot zero seven
2022 should evaluate to Monday okay so with the date library the first thing you have to do is we have to convert this input string to something that the date library can work with and then we can figure out the day of the week so let's let's see what the date library can how the date library
can process input strings the section constructors should have functions for that let's see there are
date format objects maybe in the API API reference we can find something yeah this looks like the
thing we need constructed date time by parsing the DT date time string following the pattern given in the format string okay and you can see it has two arguments DT and format we're given some examples
so here it parses the the date string twenty twenty first first January first and the format string is y y y y so this then parses 2020 as the year followed by mm which parses 11 as the
month and followed by DD which parses 01 as the day of the month okay so we can so we can call
date time on our German date here and we have to come up with some format string let's see whether this works or not so let's use the example from the from the task description day of week not
defined yeah that makes sense okay now it's different but date time is not defined that's because we have to include we have to load the the date time library to load this library should
be sufficient to just type using dates so let's do this let's type using dates in front of our function okay but now format is not defined yeah makes sense okay and now the yeah the argument we
give to date time is obviously wrong but otherwise we already get the we already get the error message from the date time library so let's have a look at which format strings we can use the documentation
says see date format for syntax so that's what we will do and test this helpful table here which we can use to put together our format string and in our format string we have we have the the day
first then the dot space then the month 07 another dot a space and then the year so it
says characters not listed above are normally treated as limiters between date and time slots as you can see it doesn't list a space or the dot and that's why we can just use space and dots to
represent those and for the other parts we should be able to just use M and D for the day and Y for the year so let's try that so it would be DD dot space mm dot space by why why let's see what this
returns nice okay it's a it's a another representation for this date time let's see what the
type is okay the type state time so that's the type from the date time library okay so the first part of our work is done we have put our string represented date into the date time library now
to find the day of the week let's see maybe there will be some function as some description that includes week okay there's dates dot a week which returns a number there's day of week ah okay now
here dates dot day name day name that should do the trick it returns a string called which which
says Friday so that's basically what we want let's see
okay now it says Monday great let's try the update Tuesday Wednesday perfect okay and with
that we're done with the dates task task seven it's about symbolic math and the first thing we have to do is to find a Julia module that provides functions for symbolic math all right so let's use some search engine to do that and as we can see there is a package called Julia symbolics which
has this documentation live website it says that there are three layers and yeah one of them is
designed for everyday symbolic computing needs I think this is what we have so let's look at that okay first it tells us how to install the package so let's do that first
So, the package was called symbolics, right? Okay, as we can see this has installed a lot of stuff.
Now we should be able to load the package. Oh no, it's still not done. Yeah, it says pre-compiling and there's a lot of check marks. Okay, successfully pre-compiled, great. So, let's load the package.
Okay, and now as we have already installed it this was just a no-op basically, so a line of code that does nothing. All right,
now let's see how we can use the package. The GitHub website includes this example where they create three variables t, x, and y. Then they create this thing which they call a differential. So, they define a function z equals t plus t squared.
Then they call d with the argument z which returns this differential. And then they call the function expand derivatives on d of that which gives them the differential of this function here.
Okay, so let's try that ourselves. First, we have to define some variables. So, in our function that we've given in the exercise,
we have two variables. The variables are called x and m. Okay, this returns a nice looking vector of x and m. And now we can define our function. So, f equals
exponential function. So, the exponential function is just the built-in Julia function. And then x to the n as the parameter to that, as the argument, sorry. Let's see what this gives us. Okay, that's just our function e to the x to the n.
And now we create this differential of f. Ah, d is not defined. Yeah, of course we have to. Yeah, okay, first we have to create the differential.
And here we specify, we specify the variable for which we want to differentiate. As you can see, here they compute the derivative with respect to t. And in the exercise, we want to compute a derivative with respect to x.
All right, and this gives us this mathematical notation for the derivative.
So, d over dx times the function that we are taking the derivative of. And now we can call the function expand derivative. Ah, which is not defined, so we probably have to, maybe I typed it wrong.
Interesting, maybe we have to, we have to prepend it using the symbolics package name. Expand derivative not defined. Hmm, that's weird. Ah, okay, it's called expand derivatives. Okay.
Okay, and there it is, the first, the first derivative of our function. Okay, let's calculate the second derivative. For this we just use the,
um, the d operator, the d function one more time. And we get this, the second order derivative with respect to x. And let's use the operator a third time.
Okay, and here's the third order derivative. Okay, so this is how you can use Julia for your math homework. And with that we're done with this task. For task eight we have to solve a system of linear equations using Julia. And the first step is to model the left hand side of the system as a Julia matrix.
So, for the first row we just put the coefficients of the system into our matrix separated by spaces. And then to indicate that we want a new row we put a semicolon. And every time there is no coefficient in the linear system we just put a one, because that's what this mathematical
notation means. We have to be careful to get the, to get the signs of the coefficients right, so when there's a minus we have to put a minus into our matrix.
Yeah, that's our coefficient matrix done. And the next step is to model the right hand side as a vector. And now we can solve the system by using the backslash operator.
There we have the solution. We can assign this to a variable. And using this variable we can now check if the solution is correct. That's not really a step we have to do, because obviously if it's, if it's implemented in the Julia standard library we can be pretty confident
that it's correct. But just to see how these variables interact we can calculate the product a times x and we should get b. And yeah, minus, minus some, some floating point inaccuracy here we get exactly the same vector. So two, one, minus three, minus three. And we get as the result.
And with that we are done with task eight of this exercise sheet. I hope that this video helped you to answer all of your questions about the tasks in this exercise sheet. If not, please reach out to us and ask your questions either via an email or in the
Moodle forum. In any case, thanks for watching and have a nice day.