Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

2.

3 Here are the data types for each of the given examples:

a) The month of highest number of property sales for each real estate company in South Australia:

Data Type: String (for the month names) or Date (if represented as specific dates)

b) The department in which each of a sample of university professors teaches:

Data Type: String (department names)

c) The weekly closing price of gold throughout a year:

Data Type: Numeric (floating-point numbers, representing prices)

d) The size of soft drink (large, medium, or small) ordered by each of a sample of customers in a
restaurant:

Data Type: Categorical (string or enumeration representing sizes)

e) The number of Toyota cars sold each month of 2016 in Auckland:

Data Type: Numeric (integer, representing the number of cars sold)

2.8 Here are the data types for each of the given survey questions:

a) What is your age?

Data Type: Numeric (integer or decimal), representing age in years.

b) On which floor do you live?

Data Type: Numeric (integer), representing the floor number. Alternatively, it could be categorical data
if floor numbers are labeled (e.g., 1st floor, 2nd floor, etc.).

c) Do you own or rent?


Data Type: Categorical (options: own, rent).

d) How many bedrooms are there in your flat?

Data Type: Numeric (integer), representing the number of bedrooms.

e) Does your block have a pool?

Data Type: Categorical (options: yes or no).

f) How would you rate your satisfaction with the common facilities (e.g., swimming pool, tennis court)
available to the residents (very good, good, or poor)?

Data Type: Ordinal (categories have an inherent order but not necessarily equal intervals),
representing satisfaction levels (e.g., very good > good > poor).

3.3

One possible graphical method to summarise the data is a pie chart. A pie chart shows the relative
proportions of each category of a categorical variable as a slice of a circle. The size of each slice is
proportional to the frequency or percentage of that category. A pie chart can help to compare the
categories and see how they contribute to the whole.

To create a pie chart for the data, I need to calculate the percentage of each category by dividing the
frequency by the total number of observations (500) and multiplying by 100. Then, I can use a tool like
Excel or R to draw the pie chart with the percentages as labels. Alternatively, I can use my graphic_art
function to create a pie chart for you. Here is an example of how I would invoke it:

graphic_art("a pie chart with labels Unemployed 4.8%, Manager 32.4%, Blue-collar worker 10.8%,
Clerical worker 36%, Other 1.6%")

I’ll try to create that.

3.2

To present the sales by state or territory, one possible graphical technique is a bar chart. A bar chart
shows the frequency or value of a categorical variable as a series of bars. The height or length of each
bar is proportional to the frequency or value of that category. A bar chart can help to compare the
categories and see how they differ in magnitude.

To create a bar chart for the data, I need to use the state names as the labels for the x-axis and the
number of sales as the values for the y-axis. Then, I can use a tool like Excel or R to draw the bar chart
with appropriate colors and titles. Alternatively, I can use my graphic_art function to create a bar chart
for you. Here is an example of how I would invoke it:

graphic_art("a bar chart with x-axis labels NSW, Victoria, Queensland, WA, SA, Tasmania, ACT, NT and y-
axis values 32149, 26264, 19606, 8740, 5624, 1613, 1494, 902")

I’ll try to create that.

To present the sales share by state or territory, another possible graphical technique is a pie chart. A pie
chart shows the relative proportions of each category of a categorical variable as a slice of a circle. The
size of each slice is proportional to the frequency or percentage of that category. A pie chart can help to
compare the categories and see how they contribute to the whole.

To create a pie chart for the data, I need to calculate the percentage of each category by dividing the
number of sales by the total number of sales (96392) and multiplying by 100. Then, I can use a tool like
Excel or R to draw the pie chart with the percentages as labels. Alternatively, I can use my graphic_art
function to create a pie chart for you. Here is an example of how I would invoke it:

graphic_art("a pie chart with labels NSW 33.4%, Victoria 27.2%, Queensland 20.3%, WA 9.1%, SA 5.8%,
Tasmania 1.7%, ACT 1.6%, NT 0.9%")

I’ll try to create that.

I hope this helps you with your task. If you have any follow-up questions, feel free to ask me. 😊

You might also like