got this question in interview

Raj 21 Reputation points
2021-01-28T09:03:54.677+00:00

Hi, Members
I got this question in interview.

Manager looks at the mean height which is recorded in the Database by summing all recorded heights and dividing by the number of recordings. He is surprised to see that the mean height is 3.15 and the maximum is 305. What has not he taken into account about how the data is being recorded?

Can anyone guide me, what could be answer or any suggestions ??

Thanks.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,870 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,562 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 41,021 Reputation points
    2021-01-28T09:22:28.523+00:00

    What has not he taken into account about how the data is being recorded?

    That's more a mathematic / statistic question then a SQL Server one.

    Answer: He missed the mean deviation. The max figure of 305 may exists one time, figure 3 may be 1000 times.

    2 people found this answer helpful.
    0 comments No comments

  2. Tom Phillips 17,716 Reputation points
    2021-01-28T15:27:42.737+00:00

    I agree with Olaf,

    I don't understand the question "how the data is being recorded?". The data is the data.

    IMHO, the ANALYSIS of the data could be flawed. The other option is to throw out the high/low out of range values. But again, that is an analysis question, not a reason to change the "data being recorded".

    Unless they are looking for an answer like "the table should have a date of measurement" or something. But that doesn't affect the query, because they didn't indicated a date range.

    2 people found this answer helpful.
    0 comments No comments