Edited, memorised or added to reading queue

on 09-Jun-2020 (Tue)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 5039296744716

Tags
#data-type-definition #has-images #numpy-ndarray-datatypes-and-operations #python-for-data-science
Question
Describe a case where it is important to define the data type when creating an array.
[unknown IMAGE 5038190234892]
Answer
As we showed you previously, datatypes matter. If you try to assign an element in an integer array, to a floating point value, you’ll get an error. Let’s start by just doing some basics with with these. We’ll start by creating an array and giving it two integers. The type of the array is, unsurprisingly, gonna be an integer. Similarly, if we give it floats, we’re gonna get back a float array. We can also explicitly say the type we want, by creating the array. Here, we’re saying that we want the type to be integer. Where this gets useful is when you wanna force a different type in the input. Here, I’m providing two floats to the constructor, and I’m telling it to make the type integer. Numpy will do this, it just forces the floats to drop their decimal, effectively doing the floor function. Similarly, we can force ints to be floats. This is less problematic because we’re not losing any information. The reason you might wanna do this is if you presently have integer data, but expect for the values to change to floats in the future. You don’t want Python to pick int datatypes here, only to run into problems later. Just keep in mind that datatypes matter for ndarrays.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
As we showed you previously, datatypes matter. If you try to assign an element in an integer array, to a floating point value, you’ll get an error. Let’s start by just doing some basics with with these. We’ll start by creating an array and giving it two integers. The type of the array is, unsurprisingly, gonna be an integer. Similarly, if we give it floats, we’re gonna get back a float array. We can also explicitly say the type we want, by creating the array. Here, we’re saying that we want the type to be integer. Where this gets useful is when you wanna force a different type in the input. Here, I’m providing two floats to the constructor, and I’m telling it to make the type integer. Numpy will do this, it just forces the floats to drop their decimal, effectively doing the floor function. Similarly, we can force ints to be floats. This is less problematic because we’re not losing any information. The reason you might wanna do this is if you presently have integer data, but expect for the values to change to floats in the future. You don’t want Python to pick int datatypes here, only to run into problems later. Just keep in mind that datatypes matter for ndarrays.

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 5043341102348

Tags
#arithmetic-mean #average #probability-random-variables-statistics-and-random-processes #sample-mean
Question
Discuss about the sample mean. Is it a random variable? Why?
Answer

An important measure of central tendency for a set of data is the sample mean, also known as the arithmetic mean, or commonly called the average. The sample mean summarizes the set of data values into one approximate value. The sample mean, however, may not be a data value in the set. The sample mean takes all of the data values into account, as all of the data values are added and then divided by the number of data values in the set. Assuming the data set consists of \(n \geq 1\) datavalues, \(X_1 , X_2 , \ldots , X_n\) , the sample mean is defined as follows:

\(\overline{X}_n = \left( \displaystyle \frac{1}{n} \right) \displaystyle \sum_{i=1}^n X_i \tag{8.1}\)

Note that the sum of the deviations of the individual observations of a sample about the sample mean is always zero. It is important to note that \(\overline{X}_n\) is a function of the data set, therefore when the data set changes, the value of the sample mean likely changes. The sample mean is thus a random variable, has a probability density function, and as such, has an expected value and a variance.


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
An important measure of central tendency for a set of data is the sample mean, also known as the arithmetic mean, or commonly called the average. The sample mean summarizes the set of data values into one approximate value. The sample mean, however, may not be a data value in the set. The sample mean takes all of the data values into account, as all of the data values are added and then divided by the number of data values in the set. Assuming the data set consists of \(n \geq 1\) datavalues, \(X_1 , X_2 , \ldots , X_n\) , the sample mean is defined as follows: \(\overline{X}_n = \left( \displaystyle \frac{1}{n} \right) \displaystyle \sum_{i=1}^n X_i \tag{8.1}\) Note that the sum of the deviations of the individual observations of a sample about the sample mean is always zero. It is important to note that \(\overline{X}_n\) is a function of the data set, therefore when the data set changes, the value of the sample mean likely changes. The sample mean is thus a random variable, has a probability density function, and as such, has an expected value and a variance.

Original toplevel document (pdf)

cannot see any pdfs







➢ Testis of male baby are formed during 7 th to 8 th week of pregnancy and are intra- abdominal. ➢ Testis migrate to scrotum during 7 th to 8 th month of pregnancy. ➢ Cryptorchidism: Failure of Testis to descend into scrotum.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 5524445072652

Tags
#has-images
Question
Differentiage average from expected value.
[unknown IMAGE 5524445596940]

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill