Answers.Body: <p>In statistics you deal with possibly large sets of data. Sometimes you need all of the data available at once for some sort of processing. Arrays are helpful for this. Sometimes you need to sort the data. Again, arrays can be helpful, as can binary trees. </p>
  
  <p>Finding the median of a set of values is interesting. Initially it sounds like it is a sorting problem, but it is a bit more subtle than that. But arrays are still useful. </p>
  
  <p>Lists, by the way, which are similar to arrays in some ways, are possibly even more fundamental. </p>
  
  <p>But some things are worth studying for no other reason than that they help you expand your mental facilities. Studying things somewhat on the periphery of your main interest can help you, potentially, in that main line study. Programming is like that for statistics, as is mathematics in general. When you learn things you generally increase your potential for learning other things. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T22:53:16.497Z
Answers.Text: She is at an age where she can't really see how important it is to have general knowledge.
Answers.UserDisplayName: Med
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T22:55:26.110Z
Answers.Text: I would think second year university is old enough, actually. Perhaps she is too focused, generally.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T22:59:02.753Z
Answers.Text: It's french system known as CPGE ( Classes Préparatoires aux Grandes Ecoles) with a lot of maths and physics, a few computer science, and a LOT of pressure. As computer science is not seen as a prerequisite or important subject for her, that maybe why she can't see why I focus so much on making her being at ease with lists/arrays
Answers.UserDisplayName: Med
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T18:27:54.167Z
Answers.LastActivityDate: 2018-10-19T18:27:54.167Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>Try to let her model a questionaire and aswers from different people. Ask her how she would organize the data on a sheet of paper. Let her do so for </p>
  
  <ul>
  <li>one questionaire filled in by one person</li>
  <li>question 1 (e.g. "your age") for all questionaires</li>
  <li>all questions for all questionaires</li>
  </ul>
  
  <p>This should result in two 1d-arrays (and bring up the topic of data types, lists can be a solution) and one 2d-array.</p>
  
  <p>Those data representations are quite common in statistics, based on those you can e.g. calculate the median, standard deviation, min, max, ... </p>
  
  <p>If you are using a language with an simple interface to gnuplot (like python and mathplolib), you can easily visualize array contents using box plots, scatter plots, etc. This is a direct link to statistics. It is simple to copy-paste example and adapt code from the tutorials, so even a beginner can have nice visual results.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-12T09:16:04.400Z
Answers.Text: Simple, but exactly what i was looking for
Answers.UserDisplayName: Med
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-29T14:26:43.007Z
Answers.LastActivityDate: 2018-10-29T14:26:43.007Z
Answers.UserDisplayName: OBu
Answers.Body: <p>Have you tried a simple statistics formula such as <span class="math-container">$$mean = \left(\sum_{i=1}^{n} x_i\right) / n$$</span> This maps exactly to array notation. Explain that the array <code>x</code> refers to the entire set of values and that <code>x[i]</code> refers to a single element in the set. Then show a simple loop that performs the computation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-23T22:11:27.447Z
Answers.Text: I will try this
Answers.UserDisplayName: Med
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-23T19:09:39.340Z
Answers.LastActivityDate: 2018-11-06T20:24:31.200Z
Answers.LastEditDate: 2018-11-06T20:24:31.200Z
Answers.UserDisplayName: Fritz Sieker
Answers.Body: <p>I had a student some time back who also really struggled with concepts like this, but who was interested in research in psychology which for her was largely about statistics.</p>
  
  <p>Statistical data is nothing but arrays, or perhaps <em>tables</em>, that is, 2-dimensional arrays. Statisticians conduct trials consisting of <em>observations</em>. An observation is a simultaneous measurement of some <em>variables</em>. The numeric ("quantitative") variables are distinguished from "categorical" variables that assume values in a prescribed finite set. Anyway, the variables typically go across the columns and the observations go down the rows of the table. The R programming language/environment is based entirely on arrays for this reason and many of its most important statistical functions are optimized to work on "columns" of a table: that is, arrays.</p>
  
  <p>I would explain to your student how the vast majority of statistical observation is in fact naturally in array form. If she has any spreadsheets to show you you can find many examples of arrays in her data and show how the calculations she has already done to analyze them are in fact array-based calculations as suggested in another answer with means. An array-based language like R, but really any language, will lend itself to some calculations that can be a real pain to do in something like Excel. Find those examples and I think you will have made some progress.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-01T04:24:55.053Z
Answers.LastActivityDate: 2018-11-01T04:24:55.053Z
Answers.UserDisplayName: Dave R
Answers.Body: <p>If you are tutoring her, it is wonderful that you are trying to motivate the material in a practical way, but don't beat yourself up too much if you aren't that successful at persuading her. Some people just get themselves into a sort of myopic headspace where the only things that they need to learn are the exact operations that they will perform later on in their life.</p>
  
  <p>However, it has been my experience that there is often something else going on in these situations. People aren't creating these excuses because of what will be practical in the future. They have no idea what the future holds. They actually create these utilitarian excuses simply because they don't find the topic <em>intrinsically fun</em> yet.</p>
  
  <p>This also explains why you make no headway when you show her the utilitarian benefits; they aren't truly what is preventing her from diving in. Your best bet, then, is to show her why you think this whole field is amazing.</p>
  
  <p>And if all else fails, go back to a utilitarian approach, but stick to the most direct reason: she needs this so that she will pass her class next semester.  That was a strong enough motivation for her to meet with you in the first place, so it should work out well enough to at least get you through the lessons.</p>
  
  <p>Good luck!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T22:54:46.813Z
Answers.Text: Maybe in the next lessons, as we have finished to learn lists basic, nex step is to take a big problem and split it in simplier problems which she know how to solve, divide and conquer ;)
  I plan to make her code a little tic tac toe game which can be a more fun way to manipulate lists.
Answers.UserDisplayName: Med
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T19:06:42.497Z
Answers.LastActivityDate: 2018-10-19T19:06:42.497Z
Answers.UserDisplayName: Ben I.
Answers.Body: <p>Arrays are like dressers: they allow you to organize a collection of objects and store them in a single place.  A dataset in stat should be seen as an array of results (numbers, vectors, etc.).  The array object is provided with a nice array of methods for searching itself, inserting items, and and for item access.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-23T00:44:42.940Z
Answers.LastActivityDate: 2018-10-23T00:44:42.940Z
Answers.UserDisplayName: ncmathsadist
Answers.Body: <p>It shouldn't be so difficult to come to a point where she really wants to use arrays. Just ask her what she has done so far in the mathematics/physics part of her degree. I am 100% sure that there will be something for which she needed linear algebra to solve it. Decoupling of harmonic oscillators for example, or just any eigenvalue problem in quantum mechanics. Then ask her to write a program which does these calculations without using arrays. Make it big enough. <span class="math-container">$10\times 10$</span>-matrices should do the job. If she doesn't give up after declaring 100 variables with distinct names, then she will definitely give up at the first instance of matrix multiplication, when she realizes, that she can't loop over those 100 names and that she has to write out every arithmetic operation one by one.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-11T07:40:38.787Z
Answers.LastActivityDate: 2018-11-11T07:40:38.787Z
Answers.UserDisplayName: Nico
Answers.Body: <p>So these are two different questions. To show her how important arrays are compared to for example lists you could use a metaphor like a book. 
  If you want to find page 831 with a list you need to look at every single page before that. With an array you just jump to page 831 which is a lot faster. 
  In the future she will work with big chunks of data. This means she has to be efficient. Arrays are the way to achieve it.</p>
  
  <p>The second part why programming is important. You could ask people who already work in the industry to give you day to day tasks they have to deal with and show her this way that if she works in this field she will use programming a lot. From my experience people who work in statistics are always happy to help people who are interested in there work. </p>
  
  <p>Also it is important to remember that a company will choose someone with coding experience if they have the same qualifications otherwise. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T19:07:21.677Z
Answers.Text: Welcome to CSEd! That's a nice first post :)
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T22:50:54.093Z
Answers.Text: Good point about coding experience will help her find a job. It's true, but I would like to show her that's it a real plus for her everyday life at her futur job.
Answers.UserDisplayName: Med
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-19T18:20:03.907Z
Answers.LastActivityDate: 2018-10-19T18:20:03.907Z
Answers.UserDisplayName: Mibi
Body: <p>I am a computer engineer, and I’m teaching computer sciences one hour per week to a student who failed her second-year university degree. She needed some help to have a better understanding of programming, and increase her grade in this field. Computer science is not the main subject of her degree which is based on maths and physics.</p>
  
  <p>I asked her if she wanted to emphasise on a difficult subject for her, or if I should start from scratch and explain programming as if it was totally new for her. She chose the second solution, so I started to explain her the base of programming, binary, variables, functions, conditional statements, loops. And now I emphasis on the most common data structure ever, the array.</p>
  
  <p>I teach her how to use an array, manipulate its element, etc...
  As she had to use programming to solve problems of graph theory, physics measurements, and mathematical algorithms which use a lot of matrices and arrays, I spend about six hours to make her be more familiar with it. </p>
  
  <p>I simplified it to make her use one-dimensional arrays with a simple algorithm, and she just told me that she can’t understand how arrays will be of any use for her, for her everyday life. She aims to get job in the field of statistics.</p>
  
  <p>I explained to her, that she uses array everyday without thinking about it. For example when you log in a website, there’s somewhere an array (or an object) which stores your username, password, email, and compares it to what is stored in a database. But she didn’t feel very enthusiastic.</p>
  
  <p>So  I can understand that not everybody enjoys programming, and as I am not a statistician I can’t really tell her about how useful this can be for a statistician.</p>
  
  <p>What can I do to actually make her change her mind about programming or show her the use of it for a statistician ?</p>
  
  <p><strong>EDIT:</strong>
  I work as Web developper so I am not used to statistics. I can't think about useful example or exercise to show her the usage of arrays in statistics.</p>
  
  <p><strong>EDIT:</strong>
  She already saw by herself that was I taugh her about arrays is usefull in various situation. She saw that know, as she understood arrays, she can now solve problems she wasn't able to solve before.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-19T17:20:59.307Z
Comments.Text: Surely she must understand the value of being able to store a data series, and calculate its properties? Something as simple as calculating the mean might be a useful first step.
Comments.UserDisplayName: Anyon
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-19T22:36:50.817Z
Comments.Text: Maybe it's too simple and she need something more difficult, to see how computing is a good way to solve the problem. That's what I'm wondering because I taugh  the basics ( find max/min, count how many times the value 'x' is in the list, how many elements verify a condition, etc...) in order to make her more at ease manipulating datas. Maybe it's because I didn't link it to some sort of mathematical problem  that she can't see about the use of lists/arrays...
Comments.UserDisplayName: Med
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-24T20:52:27.887Z
Comments.Text: Re, "...there’s somewhere an array (or an object) which stores your username, password,..." IMO, there's quite a difference between how you use an array (members are addressed by numeric index, all have the same type), and an object (members accessed by name, non-homogeneous types.)
Comments.UserDisplayName: Solomon Slow
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-10-24T20:59:30.270Z
Comments.Text: A much better example of an array---one with which any statistician should be intimately familiar---would be a range of cells in a spreadsheet.
Comments.UserDisplayName: Solomon Slow
Tags: <student-motivation><python><struggling-students>
Title: Explaining why arrays are important for statisticians
ThreadText: # Explaining why arrays are important for statisticians
  
  (Asked by: username_0 on 2018-10-18)
  
  I am a computer engineer, and I’m teaching computer sciences one hour per week to a student who failed her second-year university degree. She needed some help to have a better understanding of programming, and increase her grade in this field. Computer science is not the main subject of her degree which is based on maths and physics.
  
  I asked her if she wanted to emphasise on a difficult subject for her, or if I should start from scratch and explain programming as if it was totally new for her. She chose the second solution, so I started to explain her the base of programming, binary, variables, functions, conditional statements, loops. And now I emphasis on the most common data structure ever, the array.
  
  I teach her how to use an array, manipulate its element, etc...
  As she had to use programming to solve problems of graph theory, physics measurements, and mathematical algorithms which use a lot of matrices and arrays, I spend about six hours to make her be more familiar with it.
  
  I simplified it to make her use one-dimensional arrays with a simple algorithm, and she just told me that she can’t understand how arrays will be of any use for her, for her everyday life. She aims to get job in the field of statistics.
  
  I explained to her, that she uses array everyday without thinking about it. For example when you log in a website, there’s somewhere an array (or an object) which stores your username, password, email, and compares it to what is stored in a database. But she didn’t feel very enthusiastic.
  
  So I can understand that not everybody enjoys programming, and as I am not a statistician I can’t really tell her about how useful this can be for a statistician.
  
  What can I do to actually make her change her mind about programming or show her the use of it for a statistician ?
  
  **EDIT:**
  I work as Web developper so I am not used to statistics. I can't think about useful example or exercise to show her the usage of arrays in statistics.
  
  **EDIT:**
  She already saw by herself that was I taugh her about arrays is usefull in various situation. She saw that know, as she understood arrays, she can now solve problems she wasn't able to solve before.
  
  **Tags:** student-motivation, python, struggling-students
  
  > **Comments:**
  > **username_1**: Surely she must understand the value of being able to store a data series, and calculate its properties? Something as simple as calculating the mean might be a useful first step.  
  > **username_0**: Maybe it's too simple and she need something more difficult, to see how computing is a good way to solve the problem. That's what I'm wondering because I taugh  the basics ( find max/min, count how many times the value 'x' is in the list, how many elements verify a condition, etc...) in order to make her more at ease manipulating datas. Maybe it's because I didn't link it to some sort of mathematical problem  that she can't see about the use of lists/arrays...  
  > **username_2**: Re, "...there’s somewhere an array (or an object) which stores your username, password,..." IMO, there's quite a difference between how you use an array (members are addressed by numeric index, all have the same type), and an object (members accessed by name, non-homogeneous types.)  
  > **username_2**: A much better example of an array---one with which any statistician should be intimately familiar---would be a range of cells in a spreadsheet.  
  
  ---
  
  ## 8 answers
  
  ### Answer by username_4 on 2018-10-29. Score: 3 | Accepted answer
  
  Try to let her model a questionaire and aswers from different people. Ask her how she would organize the data on a sheet of paper. Let her do so for
  
  * one questionaire filled in by one person
  * question 1 (e.g. "your age") for all questionaires
  * all questions for all questionaires
  
  This should result in two 1d-arrays (and bring up the topic of data types, lists can be a solution) and one 2d-array.
  
  Those data representations are quite common in statistics, based on those you can e.g. calculate the median, standard deviation, min, max, ...
  
  If you are using a language with an simple interface to gnuplot (like python and mathplolib), you can easily visualize array contents using box plots, scatter plots, etc. This is a direct link to statistics. It is simple to copy-paste example and adapt code from the tutorials, so even a beginner can have nice visual results.
  
  > **Comments:**
  > **username_0**: Simple, but exactly what i was looking for  
  
  ---
  
  ### Answer by username_7 on 2018-10-19. Score: 8
  
  If you are tutoring her, it is wonderful that you are trying to motivate the material in a practical way, but don't beat yourself up too much if you aren't that successful at persuading her. Some people just get themselves into a sort of myopic headspace where the only things that they need to learn are the exact operations that they will perform later on in their life.
  
  However, it has been my experience that there is often something else going on in these situations. People aren't creating these excuses because of what will be practical in the future. They have no idea what the future holds. They actually create these utilitarian excuses simply because they don't find the topic *intrinsically fun* yet.
  
  This also explains why you make no headway when you show her the utilitarian benefits; they aren't truly what is preventing her from diving in. Your best bet, then, is to show her why you think this whole field is amazing.
  
  And if all else fails, go back to a utilitarian approach, but stick to the most direct reason: she needs this so that she will pass her class next semester. That was a strong enough motivation for her to meet with you in the first place, so it should work out well enough to at least get you through the lessons.
  
  Good luck!
  
  > **Comments:**
  > **username_0**: Maybe in the next lessons, as we have finished to learn lists basic, nex step is to take a big problem and split it in simplier problems which she know how to solve, divide and conquer ;) I plan to make her code a little tic tac toe game which can be a more fun way to manipulate lists.  
  
  ---
  
  ### Answer by username_5 on 2018-10-23. Score: 6
  
  Have you tried a simple statistics formula such as $$mean = \left(\sum\_{i=1}^{n} x\_i\right) / n$$ This maps exactly to array notation. Explain that the array `x` refers to the entire set of values and that `x[i]` refers to a single element in the set. Then show a simple loop that performs the computation.
  
  > **Comments:**
  > **username_0**: I will try this  
  
  ---
  
  ### Answer by username_6 on 2018-11-01. Score: 5
  
  I had a student some time back who also really struggled with concepts like this, but who was interested in research in psychology which for her was largely about statistics.
  
  Statistical data is nothing but arrays, or perhaps *tables*, that is, 2-dimensional arrays. Statisticians conduct trials consisting of *observations*. An observation is a simultaneous measurement of some *variables*. The numeric ("quantitative") variables are distinguished from "categorical" variables that assume values in a prescribed finite set. Anyway, the variables typically go across the columns and the observations go down the rows of the table. The R programming language/environment is based entirely on arrays for this reason and many of its most important statistical functions are optimized to work on "columns" of a table: that is, arrays.
  
  I would explain to your student how the vast majority of statistical observation is in fact naturally in array form. If she has any spreadsheets to show you you can find many examples of arrays in her data and show how the calculations she has already done to analyze them are in fact array-based calculations as suggested in another answer with means. An array-based language like R, but really any language, will lend itself to some calculations that can be a real pain to do in something like Excel. Find those examples and I think you will have made some progress.
  
  
  ---
  
  ### Answer by username_8 on 2018-10-23. Score: 3
  
  Arrays are like dressers: they allow you to organize a collection of objects and store them in a single place. A dataset in stat should be seen as an array of results (numbers, vectors, etc.). The array object is provided with a nice array of methods for searching itself, inserting items, and and for item access.
  
  
  ---
  
  ### Answer by username_9 on 2018-11-11. Score: 3
  
  It shouldn't be so difficult to come to a point where she really wants to use arrays. Just ask her what she has done so far in the mathematics/physics part of her degree. I am 100% sure that there will be something for which she needed linear algebra to solve it. Decoupling of harmonic oscillators for example, or just any eigenvalue problem in quantum mechanics. Then ask her to write a program which does these calculations without using arrays. Make it big enough. $10\times 10$-matrices should do the job. If she doesn't give up after declaring 100 variables with distinct names, then she will definitely give up at the first instance of matrix multiplication, when she realizes, that she can't loop over those 100 names and that she has to write out every arithmetic operation one by one.
  
  
  ---
  
  ### Answer by username_10 on 2018-10-19. Score: 2
  
  So these are two different questions. To show her how important arrays are compared to for example lists you could use a metaphor like a book.
  If you want to find page 831 with a list you need to look at every single page before that. With an array you just jump to page 831 which is a lot faster.
  In the future she will work with big chunks of data. This means she has to be efficient. Arrays are the way to achieve it.
  
  The second part why programming is important. You could ask people who already work in the industry to give you day to day tasks they have to deal with and show her this way that if she works in this field she will use programming a lot. From my experience people who work in statistics are always happy to help people who are interested in there work.
  
  Also it is important to remember that a company will choose someone with coding experience if they have the same qualifications otherwise.
  
  > **Comments:**
  > **username_7**: Welcome to CSEd! That's a nice first post :)  
  > **username_0**: Good point about coding experience will help her find a job. It's true, but I would like to show her that's it a real plus for her everyday life at her futur job.  
  
  ---
  
  ### Answer by username_3 on 2018-10-19. Score: 1
  
  In statistics you deal with possibly large sets of data. Sometimes you need all of the data available at once for some sort of processing. Arrays are helpful for this. Sometimes you need to sort the data. Again, arrays can be helpful, as can binary trees.
  
  Finding the median of a set of values is interesting. Initially it sounds like it is a sorting problem, but it is a bit more subtle than that. But arrays are still useful.
  
  Lists, by the way, which are similar to arrays in some ways, are possibly even more fundamental.
  
  But some things are worth studying for no other reason than that they help you expand your mental facilities. Studying things somewhat on the periphery of your main interest can help you, potentially, in that main line study. Programming is like that for statistics, as is mathematics in general. When you learn things you generally increase your potential for learning other things.
  
  > **Comments:**
  > **username_0**: She is at an age where she can't really see how important it is to have general knowledge.  
  > **username_3**: I would think second year university is old enough, actually. Perhaps she is too focused, generally.  
  > **username_0**: It's french system known as CPGE ( Classes Préparatoires aux Grandes Ecoles) with a lot of maths and physics, a few computer science, and a LOT of pressure. As computer science is not seen as a prerequisite or important subject for her, that maybe why she can't see why I focus so much on making her being at ease with lists/arrays  
  
  ---
  
  