391. Are Your Sensors Lying? Fraud Detection in Smart Home Systems Using SAS
Are Your Sensors Lying? Fraud Detection in Smart Home Systems Using SAS
HERE IN THIS PROJECT WE USED THESE SAS STATEMENTS —
DATA STEP | PROC SQL | PROC PRINT | PROC SGPLOT | MACROS | PROC CORR | PROC MEANS | PROC FREQ | PROC UNIVARIATE | APPEND | SET | PROC SORT | MERGE | PROC DATASETS DELETE | DATA FUNCTIONS
INTRODUCTION
In today’s digital era, Smart Home Systems have become an integral part of modern living. Smart homes rely on a network of interconnected sensors to monitor, control, and automate various household activities such as lighting, temperature, security, energy consumption, and safety. These sensors continuously generate large volumes of data, which must be analyzed effectively to ensure system reliability, efficiency, and security.
This project, Smart Home Sensors Analytics using SAS, is designed to simulate a real-world IoT (Internet of Things) environment where multiple smart sensors are installed across different rooms of a house. Each sensor records operational metrics such as power consumption, data transmission frequency, error rate, latency, and reliability score. By analyzing this data using SAS, we aim to derive meaningful insights that can help businesses optimize system performance, detect faulty or fraudulent sensors, and plan maintenance activities.
The primary objective of this project is to demonstrate how SAS can be used as a powerful analytics platform for IoT data. The project covers the complete data lifecycle including data creation, data transformation, statistical analysis, visualization, automation using macros, and business interpretation. This makes it a comprehensive case study for students, data analysts, and SAS programmers.
TABLE OF CONTENTS
- Introduction
- Business Context
- Problem Statement
- Project Objectives
- Data Description
- Data Creation using SAS
- Data Transformation and Cleaning
- Date and Time Analysis
- Utilization Classification using Macros
- Fraud Detection Logic
- SQL-Based Aggregation
- Descriptive Statistical Analysis
- Univariate Analysis
- Frequency Analysis
- Correlation Analysis
- Graphical Visualization
- Data Transposition
- Dataset Merging and Appending
- Character and Numeric Functions
- Dataset Maintenance and Cleanup
- Key Business Insights
- Practical Applications
- Interview Relevance
- Conclusion
1. BUSINESS CONTEXT
Smart home technology is widely used by:
- Real estate companies
- IoT device manufacturers
- Home automation service providers
- Energy management firms
- Security and surveillance companies
These organizations need continuous monitoring of sensor behavior to ensure:
- High reliability
- Low power consumption
- Minimal errors
- Fast response time
- Strong security
Poor sensor performance can lead to:
- Increased energy costs
- False alarms
- System downtime
- Customer dissatisfaction
- Security risks
PROBLEM STATEMENT
The key challenges addressed in this project are:
- Identifying sensors with high power consumption
- Detecting sensors with high error rates
- Monitoring latency issues
- Measuring overall reliability
- Classifying sensors based on utilization
- Detecting suspicious or fraudulent sensor behavior
- Performing statistical and correlation analysis
- Visualizing performance patterns
- Managing and cleaning raw sensor data
PROJECT OBJECTIVES
The main objectives of this Smart Home Sensor project are:
- To create a realistic sensor dataset
- To apply SAS data step programming
- To use SQL for business aggregation
- To perform descriptive and inferential statistics
- To implement macros for automation
- To apply date functions for lifecycle analysis
- To visualize data using graphical procedures
- To demonstrate data cleaning techniques
- To build a complete end-to-end analytics pipeline
DATA DESCRIPTION
The dataset consists of the following key variables:
Variable Name | Description |
Sensor_ID | Unique identifier for each sensor |
Room_Type | Location of sensor |
Data_Frequency | Number of data transmissions per minute |
Power_Consumption | Energy usage |
Error_Rate | Percentage of faulty readings |
Latency | Delay in milliseconds |
Reliability_Score | Performance rating |
Install_Date | Date of installation |
Utilization | High/Medium/Low classification |
Fraud_Flag | Indicates suspicious behavior |
Days_Active | Number of days since installation |
Next_Service | Next maintenance date |
2. DATASET CREATION
data smart_sensors;
input Sensor_ID $ Room_Type:$12. Data_Frequency Power_Consumption Error_Rate Latency
Reliability_Score Install_Date :date9.;
Power_Pct = Power_Consumption / 100;
Error_Pct = Error_Rate / 100;
format Install_Date date9.;
datalines;
S001 LivingRoom 60 35 2 120 95 01JAN2024
S002 Kitchen 30 55 8 200 70 05JAN2024
S003 Bedroom 15 20 1 80 98 10JAN2024
S004 Bathroom 45 40 5 160 85 15JAN2024
S005 Garage 20 70 15 300 60 20JAN2024
S006 Hall 60 25 2 110 96 25JAN2024
S007 Balcony 10 15 1 70 99 01FEB2024
S008 Office 50 60 10 220 75 05FEB2024
S009 Dining 30 45 6 180 88 10FEB2024
S010 KidsRoom 20 30 3 100 94 15FEB2024
S011 StoreRoom 10 10 0.5 50 100 20FEB2024
S012 Kitchen 25 65 12 240 72 25FEB2024
S013 LivingRoom 55 38 4 150 90 01MAR2024
S014 Bedroom 15 22 1 90 97 05MAR2024
S015 Garage 30 75 18 350 55 10MAR2024
S016 Office 60 58 9 210 78 15MAR2024
;
run;
proc print data=smart_sensors;
run;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date | Power_Pct | Error_Pct |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | 60 | 35 | 2.0 | 120 | 95 | 01JAN2024 | 0.35 | 0.020 |
| 2 | S002 | Kitchen | 30 | 55 | 8.0 | 200 | 70 | 05JAN2024 | 0.55 | 0.080 |
| 3 | S003 | Bedroom | 15 | 20 | 1.0 | 80 | 98 | 10JAN2024 | 0.20 | 0.010 |
| 4 | S004 | Bathroom | 45 | 40 | 5.0 | 160 | 85 | 15JAN2024 | 0.40 | 0.050 |
| 5 | S005 | Garage | 20 | 70 | 15.0 | 300 | 60 | 20JAN2024 | 0.70 | 0.150 |
| 6 | S006 | Hall | 60 | 25 | 2.0 | 110 | 96 | 25JAN2024 | 0.25 | 0.020 |
| 7 | S007 | Balcony | 10 | 15 | 1.0 | 70 | 99 | 01FEB2024 | 0.15 | 0.010 |
| 8 | S008 | Office | 50 | 60 | 10.0 | 220 | 75 | 05FEB2024 | 0.60 | 0.100 |
| 9 | S009 | Dining | 30 | 45 | 6.0 | 180 | 88 | 10FEB2024 | 0.45 | 0.060 |
| 10 | S010 | KidsRoom | 20 | 30 | 3.0 | 100 | 94 | 15FEB2024 | 0.30 | 0.030 |
| 11 | S011 | StoreRoom | 10 | 10 | 0.5 | 50 | 100 | 20FEB2024 | 0.10 | 0.005 |
| 12 | S012 | Kitchen | 25 | 65 | 12.0 | 240 | 72 | 25FEB2024 | 0.65 | 0.120 |
| 13 | S013 | LivingRoom | 55 | 38 | 4.0 | 150 | 90 | 01MAR2024 | 0.38 | 0.040 |
| 14 | S014 | Bedroom | 15 | 22 | 1.0 | 90 | 97 | 05MAR2024 | 0.22 | 0.010 |
| 15 | S015 | Garage | 30 | 75 | 18.0 | 350 | 55 | 10MAR2024 | 0.75 | 0.180 |
| 16 | S016 | Office | 60 | 58 | 9.0 | 210 | 78 | 15MAR2024 | 0.58 | 0.090 |
3. MACRO – UTILIZATION CLASSIFICATION
%macro utilization;
data smart_sensors;
set smart_sensors;
length Utilization $8.;
if Power_Consumption > 60 then Utilization = "High";
else if 30 < Power_Consumption < 60 then Utilization = "Medium";
else Utilization = "Low";
run;
proc print data=smart_sensors;
run;
%mend;
%utilization;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date | Power_Pct | Error_Pct | Utilization |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | 60 | 35 | 2.0 | 120 | 95 | 01JAN2024 | 0.35 | 0.020 | Medium |
| 2 | S002 | Kitchen | 30 | 55 | 8.0 | 200 | 70 | 05JAN2024 | 0.55 | 0.080 | Medium |
| 3 | S003 | Bedroom | 15 | 20 | 1.0 | 80 | 98 | 10JAN2024 | 0.20 | 0.010 | Low |
| 4 | S004 | Bathroom | 45 | 40 | 5.0 | 160 | 85 | 15JAN2024 | 0.40 | 0.050 | Medium |
| 5 | S005 | Garage | 20 | 70 | 15.0 | 300 | 60 | 20JAN2024 | 0.70 | 0.150 | High |
| 6 | S006 | Hall | 60 | 25 | 2.0 | 110 | 96 | 25JAN2024 | 0.25 | 0.020 | Low |
| 7 | S007 | Balcony | 10 | 15 | 1.0 | 70 | 99 | 01FEB2024 | 0.15 | 0.010 | Low |
| 8 | S008 | Office | 50 | 60 | 10.0 | 220 | 75 | 05FEB2024 | 0.60 | 0.100 | Low |
| 9 | S009 | Dining | 30 | 45 | 6.0 | 180 | 88 | 10FEB2024 | 0.45 | 0.060 | Medium |
| 10 | S010 | KidsRoom | 20 | 30 | 3.0 | 100 | 94 | 15FEB2024 | 0.30 | 0.030 | Low |
| 11 | S011 | StoreRoom | 10 | 10 | 0.5 | 50 | 100 | 20FEB2024 | 0.10 | 0.005 | Low |
| 12 | S012 | Kitchen | 25 | 65 | 12.0 | 240 | 72 | 25FEB2024 | 0.65 | 0.120 | High |
| 13 | S013 | LivingRoom | 55 | 38 | 4.0 | 150 | 90 | 01MAR2024 | 0.38 | 0.040 | Medium |
| 14 | S014 | Bedroom | 15 | 22 | 1.0 | 90 | 97 | 05MAR2024 | 0.22 | 0.010 | Low |
| 15 | S015 | Garage | 30 | 75 | 18.0 | 350 | 55 | 10MAR2024 | 0.75 | 0.180 | High |
| 16 | S016 | Office | 60 | 58 | 9.0 | 210 | 78 | 15MAR2024 | 0.58 | 0.090 | Medium |
4. DATE FUNCTIONS
data smart_sensors;
set smart_sensors;
Today = today();
Days_Active = intck('day', Install_Date, Today);
Next_Service = intnx('month', Install_Date, 6);
run;
proc print data=smart_sensors;
run;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date | Power_Pct | Error_Pct | Utilization | Today | Days_Active | Next_Service |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | 60 | 35 | 2.0 | 120 | 95 | 01JAN2024 | 0.35 | 0.020 | Medium | 24141 | 765 | 23558 |
| 2 | S002 | Kitchen | 30 | 55 | 8.0 | 200 | 70 | 05JAN2024 | 0.55 | 0.080 | Medium | 24141 | 761 | 23558 |
| 3 | S003 | Bedroom | 15 | 20 | 1.0 | 80 | 98 | 10JAN2024 | 0.20 | 0.010 | Low | 24141 | 756 | 23558 |
| 4 | S004 | Bathroom | 45 | 40 | 5.0 | 160 | 85 | 15JAN2024 | 0.40 | 0.050 | Medium | 24141 | 751 | 23558 |
| 5 | S005 | Garage | 20 | 70 | 15.0 | 300 | 60 | 20JAN2024 | 0.70 | 0.150 | High | 24141 | 746 | 23558 |
| 6 | S006 | Hall | 60 | 25 | 2.0 | 110 | 96 | 25JAN2024 | 0.25 | 0.020 | Low | 24141 | 741 | 23558 |
| 7 | S007 | Balcony | 10 | 15 | 1.0 | 70 | 99 | 01FEB2024 | 0.15 | 0.010 | Low | 24141 | 734 | 23589 |
| 8 | S008 | Office | 50 | 60 | 10.0 | 220 | 75 | 05FEB2024 | 0.60 | 0.100 | Low | 24141 | 730 | 23589 |
| 9 | S009 | Dining | 30 | 45 | 6.0 | 180 | 88 | 10FEB2024 | 0.45 | 0.060 | Medium | 24141 | 725 | 23589 |
| 10 | S010 | KidsRoom | 20 | 30 | 3.0 | 100 | 94 | 15FEB2024 | 0.30 | 0.030 | Low | 24141 | 720 | 23589 |
| 11 | S011 | StoreRoom | 10 | 10 | 0.5 | 50 | 100 | 20FEB2024 | 0.10 | 0.005 | Low | 24141 | 715 | 23589 |
| 12 | S012 | Kitchen | 25 | 65 | 12.0 | 240 | 72 | 25FEB2024 | 0.65 | 0.120 | High | 24141 | 710 | 23589 |
| 13 | S013 | LivingRoom | 55 | 38 | 4.0 | 150 | 90 | 01MAR2024 | 0.38 | 0.040 | Medium | 24141 | 705 | 23620 |
| 14 | S014 | Bedroom | 15 | 22 | 1.0 | 90 | 97 | 05MAR2024 | 0.22 | 0.010 | Low | 24141 | 701 | 23620 |
| 15 | S015 | Garage | 30 | 75 | 18.0 | 350 | 55 | 10MAR2024 | 0.75 | 0.180 | High | 24141 | 696 | 23620 |
| 16 | S016 | Office | 60 | 58 | 9.0 | 210 | 78 | 15MAR2024 | 0.58 | 0.090 | Medium | 24141 | 691 | 23620 |
5. FRAUD DETECTION MACRO
%macro fraud_check;
data fraud_sensors;
set smart_sensors;
length Fraud_Flag $3.;
if Error_Rate > 10 or Latency > 250 then Fraud_Flag = "YES";
else Fraud_Flag = "NO";
run;
proc print data=fraud_sensors;
run;
%mend;
%fraud_check;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date | Power_Pct | Error_Pct | Utilization | Today | Days_Active | Next_Service | Fraud_Flag |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | 60 | 35 | 2.0 | 120 | 95 | 01JAN2024 | 0.35 | 0.020 | Medium | 24141 | 765 | 23558 | NO |
| 2 | S002 | Kitchen | 30 | 55 | 8.0 | 200 | 70 | 05JAN2024 | 0.55 | 0.080 | Medium | 24141 | 761 | 23558 | NO |
| 3 | S003 | Bedroom | 15 | 20 | 1.0 | 80 | 98 | 10JAN2024 | 0.20 | 0.010 | Low | 24141 | 756 | 23558 | NO |
| 4 | S004 | Bathroom | 45 | 40 | 5.0 | 160 | 85 | 15JAN2024 | 0.40 | 0.050 | Medium | 24141 | 751 | 23558 | NO |
| 5 | S005 | Garage | 20 | 70 | 15.0 | 300 | 60 | 20JAN2024 | 0.70 | 0.150 | High | 24141 | 746 | 23558 | YES |
| 6 | S006 | Hall | 60 | 25 | 2.0 | 110 | 96 | 25JAN2024 | 0.25 | 0.020 | Low | 24141 | 741 | 23558 | NO |
| 7 | S007 | Balcony | 10 | 15 | 1.0 | 70 | 99 | 01FEB2024 | 0.15 | 0.010 | Low | 24141 | 734 | 23589 | NO |
| 8 | S008 | Office | 50 | 60 | 10.0 | 220 | 75 | 05FEB2024 | 0.60 | 0.100 | Low | 24141 | 730 | 23589 | NO |
| 9 | S009 | Dining | 30 | 45 | 6.0 | 180 | 88 | 10FEB2024 | 0.45 | 0.060 | Medium | 24141 | 725 | 23589 | NO |
| 10 | S010 | KidsRoom | 20 | 30 | 3.0 | 100 | 94 | 15FEB2024 | 0.30 | 0.030 | Low | 24141 | 720 | 23589 | NO |
| 11 | S011 | StoreRoom | 10 | 10 | 0.5 | 50 | 100 | 20FEB2024 | 0.10 | 0.005 | Low | 24141 | 715 | 23589 | NO |
| 12 | S012 | Kitchen | 25 | 65 | 12.0 | 240 | 72 | 25FEB2024 | 0.65 | 0.120 | High | 24141 | 710 | 23589 | YES |
| 13 | S013 | LivingRoom | 55 | 38 | 4.0 | 150 | 90 | 01MAR2024 | 0.38 | 0.040 | Medium | 24141 | 705 | 23620 | NO |
| 14 | S014 | Bedroom | 15 | 22 | 1.0 | 90 | 97 | 05MAR2024 | 0.22 | 0.010 | Low | 24141 | 701 | 23620 | NO |
| 15 | S015 | Garage | 30 | 75 | 18.0 | 350 | 55 | 10MAR2024 | 0.75 | 0.180 | High | 24141 | 696 | 23620 | YES |
| 16 | S016 | Office | 60 | 58 | 9.0 | 210 | 78 | 15MAR2024 | 0.58 | 0.090 | Medium | 24141 | 691 | 23620 | NO |
6. PROC SQL ANALYTICS
proc sql;
create table room_summary as
select Room_Type,
avg(Power_Consumption) as Avg_Power,
avg(Error_Rate) as Avg_Error,
avg(Reliability_Score) as Avg_Reliability
from smart_sensors
group by Room_Type;
quit;
proc print data=room_summary;
run;
OUTPUT:
| Obs | Room_Type | Avg_Power | Avg_Error | Avg_Reliability |
|---|---|---|---|---|
| 1 | Balcony | 15.0 | 1.0 | 99.0 |
| 2 | Bathroom | 40.0 | 5.0 | 85.0 |
| 3 | Bedroom | 21.0 | 1.0 | 97.5 |
| 4 | Dining | 45.0 | 6.0 | 88.0 |
| 5 | Garage | 72.5 | 16.5 | 57.5 |
| 6 | Hall | 25.0 | 2.0 | 96.0 |
| 7 | KidsRoom | 30.0 | 3.0 | 94.0 |
| 8 | Kitchen | 60.0 | 10.0 | 71.0 |
| 9 | LivingRoom | 36.5 | 3.0 | 92.5 |
| 10 | Office | 59.0 | 9.5 | 76.5 |
| 11 | StoreRoom | 10.0 | 0.5 | 100.0 |
7. PROC MEANS
proc means data=smart_sensors mean min max std;
var Power_Consumption Error_Rate Latency Reliability_Score;
run;
OUTPUT:
The MEANS Procedure
| Variable | Mean | Minimum | Maximum | Std Dev |
|---|---|---|---|---|
Power_Consumption Error_Rate Latency Reliability_Score | 41.4375000 6.0937500 164.3750000 84.5000000 | 10.0000000 0.5000000 50.0000000 55.0000000 | 75.0000000 18.0000000 350.0000000 100.0000000 | 20.4840385 5.4228490 85.3204743 14.4545264 |
8. PROC UNIVARIATE
proc univariate data=smart_sensors;
var Power_Consumption Latency;
histogram Power_Consumption Latency / normal kernel midpoints=10 to 80 by 10
cfill=gray vscale=count;
inset mean median std min max n / position=ne;
probplot Power_Consumption Latency / normal(mu=est sigma=est);
run;
OUTPUT:
The UNIVARIATE Procedure
Variable: Power_Consumption
| Moments | |||
|---|---|---|---|
| N | 16 | Sum Weights | 16 |
| Mean | 41.4375 | Sum Observations | 663 |
| Std Deviation | 20.4840385 | Variance | 419.595833 |
| Skewness | 0.130103 | Kurtosis | -1.2290794 |
| Uncorrected SS | 33767 | Corrected SS | 6293.9375 |
| Coeff Variation | 49.4335771 | Std Error Mean | 5.12100963 |
| Basic Statistical Measures | |||
|---|---|---|---|
| Location | Variability | ||
| Mean | 41.43750 | Std Deviation | 20.48404 |
| Median | 39.00000 | Variance | 419.59583 |
| Mode | . | Range | 65.00000 |
| Interquartile Range | 35.50000 | ||
| Tests for Location: Mu0=0 | ||||
|---|---|---|---|---|
| Test | Statistic | p Value | ||
| Student's t | t | 8.091666 | Pr > |t| | <.0001 |
| Sign | M | 8 | Pr >= |M| | <.0001 |
| Signed Rank | S | 68 | Pr >= |S| | <.0001 |
| Quantiles (Definition 5) | |
|---|---|
| Level | Quantile |
| 100% Max | 75.0 |
| 99% | 75.0 |
| 95% | 75.0 |
| 90% | 70.0 |
| 75% Q3 | 59.0 |
| 50% Median | 39.0 |
| 25% Q1 | 23.5 |
| 10% | 15.0 |
| 5% | 10.0 |
| 1% | 10.0 |
| 0% Min | 10.0 |
| Extreme Observations | |||
|---|---|---|---|
| Lowest | Highest | ||
| Value | Obs | Value | Obs |
| 10 | 11 | 58 | 16 |
| 15 | 7 | 60 | 8 |
| 20 | 3 | 65 | 12 |
| 22 | 14 | 70 | 5 |
| 25 | 6 | 75 | 15 |
The UNIVARIATE Procedure
The UNIVARIATE Procedure
Fitted Normal Distribution for Power_Consumption
| Parameters for Normal Distribution | ||
|---|---|---|
| Parameter | Symbol | Estimate |
| Mean | Mu | 41.4375 |
| Std Dev | Sigma | 20.48404 |
| Goodness-of-Fit Tests for Normal Distribution | ||||
|---|---|---|---|---|
| Test | Statistic | p Value | ||
| Kolmogorov-Smirnov | D | 0.12104672 | Pr > D | >0.150 |
| Cramer-von Mises | W-Sq | 0.03880802 | Pr > W-Sq | >0.250 |
| Anderson-Darling | A-Sq | 0.25231907 | Pr > A-Sq | >0.250 |
| Quantiles for Normal Distribution | ||
|---|---|---|
| Percent | Quantile | |
| Observed | Estimated | |
| 1.0 | 10.00000 | -6.21550 |
| 5.0 | 10.00000 | 7.74425 |
| 10.0 | 15.00000 | 15.18615 |
| 25.0 | 23.50000 | 27.62123 |
| 50.0 | 39.00000 | 41.43750 |
| 75.0 | 59.00000 | 55.25377 |
| 90.0 | 70.00000 | 67.68885 |
| 95.0 | 75.00000 | 75.13075 |
| 99.0 | 75.00000 | 89.09050 |
The UNIVARIATE Procedure
The UNIVARIATE Procedure
Variable: Latency
| Moments | |||
|---|---|---|---|
| N | 16 | Sum Weights | 16 |
| Mean | 164.375 | Sum Observations | 2630 |
| Std Deviation | 85.3204743 | Variance | 7279.58333 |
| Skewness | 0.70811576 | Kurtosis | -0.0698201 |
| Uncorrected SS | 541500 | Corrected SS | 109193.75 |
| Coeff Variation | 51.905992 | Std Error Mean | 21.3301186 |
| Basic Statistical Measures | |||
|---|---|---|---|
| Location | Variability | ||
| Mean | 164.3750 | Std Deviation | 85.32047 |
| Median | 155.0000 | Variance | 7280 |
| Mode | . | Range | 300.00000 |
| Interquartile Range | 120.00000 | ||
| Tests for Location: Mu0=0 | ||||
|---|---|---|---|---|
| Test | Statistic | p Value | ||
| Student's t | t | 7.706239 | Pr > |t| | <.0001 |
| Sign | M | 8 | Pr >= |M| | <.0001 |
| Signed Rank | S | 68 | Pr >= |S| | <.0001 |
| Quantiles (Definition 5) | |
|---|---|
| Level | Quantile |
| 100% Max | 350 |
| 99% | 350 |
| 95% | 350 |
| 90% | 300 |
| 75% Q3 | 215 |
| 50% Median | 155 |
| 25% Q1 | 95 |
| 10% | 70 |
| 5% | 50 |
| 1% | 50 |
| 0% Min | 50 |
| Extreme Observations | |||
|---|---|---|---|
| Lowest | Highest | ||
| Value | Obs | Value | Obs |
| 50 | 11 | 210 | 16 |
| 70 | 7 | 220 | 8 |
| 80 | 3 | 240 | 12 |
| 90 | 14 | 300 | 5 |
| 100 | 10 | 350 | 15 |
The UNIVARIATE Procedure
The UNIVARIATE Procedure
Fitted Normal Distribution for Latency
| Parameters for Normal Distribution | ||
|---|---|---|
| Parameter | Symbol | Estimate |
| Mean | Mu | 164.375 |
| Std Dev | Sigma | 85.32047 |
| Goodness-of-Fit Tests for Normal Distribution | ||||
|---|---|---|---|---|
| Test | Statistic | p Value | ||
| Kolmogorov-Smirnov | D | 0.13600233 | Pr > D | >0.150 |
| Cramer-von Mises | W-Sq | 0.04068360 | Pr > W-Sq | >0.250 |
| Anderson-Darling | A-Sq | 0.29784435 | Pr > A-Sq | >0.250 |
| Quantiles for Normal Distribution | ||
|---|---|---|
| Percent | Quantile | |
| Observed | Estimated | |
| 1.0 | 50.0000 | -34.1101 |
| 5.0 | 50.0000 | 24.0353 |
| 10.0 | 70.0000 | 55.0324 |
| 25.0 | 95.0000 | 106.8272 |
| 50.0 | 155.0000 | 164.3750 |
| 75.0 | 215.0000 | 221.9228 |
| 90.0 | 300.0000 | 273.7176 |
| 95.0 | 350.0000 | 304.7147 |
| 99.0 | 350.0000 | 362.8601 |
The UNIVARIATE Procedure
9. PROC FREQ
proc freq data=smart_sensors;
tables Room_Type*Utilization;
run;
OUTPUT:
The FREQ Procedure
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10. PROC CORR
proc corr data=smart_sensors;
var Power_Consumption Error_Rate Latency Reliability_Score;
run;
OUTPUT:
The CORR Procedure
| 4 Variables: | Power_Consumption Error_Rate Latency Reliability_Score |
|---|
| Simple Statistics | ||||||
|---|---|---|---|---|---|---|
| Variable | N | Mean | Std Dev | Sum | Minimum | Maximum |
| Power_Consumption | 16 | 41.43750 | 20.48404 | 663.00000 | 10.00000 | 75.00000 |
| Error_Rate | 16 | 6.09375 | 5.42285 | 97.50000 | 0.50000 | 18.00000 |
| Latency | 16 | 164.37500 | 85.32047 | 2630 | 50.00000 | 350.00000 |
| Reliability_Score | 16 | 84.50000 | 14.45453 | 1352 | 55.00000 | 100.00000 |
| Pearson Correlation Coefficients, N = 16 Prob > |r| under H0: Rho=0 | ||||
|---|---|---|---|---|
| Power_Consumption | Error_Rate | Latency | Reliability_Score | |
| Power_Consumption | 1.00000 | 0.95776 <.0001 | 0.97382 <.0001 | -0.95479 <.0001 |
| Error_Rate | 0.95776 <.0001 | 1.00000 | 0.98678 <.0001 | -0.97957 <.0001 |
| Latency | 0.97382 <.0001 | 0.98678 <.0001 | 1.00000 | -0.97438 <.0001 |
| Reliability_Score | -0.95479 <.0001 | -0.97957 <.0001 | -0.97438 <.0001 | 1.00000 |
11. PROC SGPLOT
proc sgplot data=smart_sensors;
scatter x=Power_Consumption y=Reliability_Score;
run;
OUTPUT:
12. PROC TRANSPOSE
proc transpose data=smart_sensors out=transposed;
by Sensor_ID NotSorted;
var Power_Consumption Error_Rate Latency;
run;
proc print data=transposed;
run;
OUTPUT:
| Obs | Sensor_ID | _NAME_ | COL1 |
|---|---|---|---|
| 1 | S001 | Power_Consumption | 35.0 |
| 2 | S001 | Error_Rate | 2.0 |
| 3 | S001 | Latency | 120.0 |
| 4 | S002 | Power_Consumption | 55.0 |
| 5 | S002 | Error_Rate | 8.0 |
| 6 | S002 | Latency | 200.0 |
| 7 | S003 | Power_Consumption | 20.0 |
| 8 | S003 | Error_Rate | 1.0 |
| 9 | S003 | Latency | 80.0 |
| 10 | S004 | Power_Consumption | 40.0 |
| 11 | S004 | Error_Rate | 5.0 |
| 12 | S004 | Latency | 160.0 |
| 13 | S005 | Power_Consumption | 70.0 |
| 14 | S005 | Error_Rate | 15.0 |
| 15 | S005 | Latency | 300.0 |
| 16 | S006 | Power_Consumption | 25.0 |
| 17 | S006 | Error_Rate | 2.0 |
| 18 | S006 | Latency | 110.0 |
| 19 | S007 | Power_Consumption | 15.0 |
| 20 | S007 | Error_Rate | 1.0 |
| 21 | S007 | Latency | 70.0 |
| 22 | S008 | Power_Consumption | 60.0 |
| 23 | S008 | Error_Rate | 10.0 |
| 24 | S008 | Latency | 220.0 |
| 25 | S009 | Power_Consumption | 45.0 |
| 26 | S009 | Error_Rate | 6.0 |
| 27 | S009 | Latency | 180.0 |
| 28 | S010 | Power_Consumption | 30.0 |
| 29 | S010 | Error_Rate | 3.0 |
| 30 | S010 | Latency | 100.0 |
| 31 | S011 | Power_Consumption | 10.0 |
| 32 | S011 | Error_Rate | 0.5 |
| 33 | S011 | Latency | 50.0 |
| 34 | S012 | Power_Consumption | 65.0 |
| 35 | S012 | Error_Rate | 12.0 |
| 36 | S012 | Latency | 240.0 |
| 37 | S013 | Power_Consumption | 38.0 |
| 38 | S013 | Error_Rate | 4.0 |
| 39 | S013 | Latency | 150.0 |
| 40 | S014 | Power_Consumption | 22.0 |
| 41 | S014 | Error_Rate | 1.0 |
| 42 | S014 | Latency | 90.0 |
| 43 | S015 | Power_Consumption | 75.0 |
| 44 | S015 | Error_Rate | 18.0 |
| 45 | S015 | Latency | 350.0 |
| 46 | S016 | Power_Consumption | 58.0 |
| 47 | S016 | Error_Rate | 9.0 |
| 48 | S016 | Latency | 210.0 |
13. APPEND, MERGE, SET
data new_sensors;
input Sensor_ID $ Room_Type $ Data_Frequency Power_Consumption Error_Rate Latency
Reliability_Score Install_Date :date9.;
datalines;
S017 Hall 20 28 2 95 96 20MAR2024
S018 Office 50 62 11 230 74 25MAR2024
;
run;
proc print data=new_sensors;
run;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date |
|---|---|---|---|---|---|---|---|---|
| 1 | S017 | Hall | 20 | 28 | 2 | 95 | 96 | 23455 |
| 2 | S018 | Office | 50 | 62 | 11 | 230 | 74 | 23460 |
proc append base=smart_sensors
data=new_sensors;
run;
proc print data=smart_sensors;
run;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date | Power_Pct | Error_Pct | Utilization | Today | Days_Active | Next_Service |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | 60 | 35 | 2.0 | 120 | 95 | 01JAN2024 | 0.35 | 0.020 | Medium | 24141 | 765 | 23558 |
| 2 | S002 | Kitchen | 30 | 55 | 8.0 | 200 | 70 | 05JAN2024 | 0.55 | 0.080 | Medium | 24141 | 761 | 23558 |
| 3 | S003 | Bedroom | 15 | 20 | 1.0 | 80 | 98 | 10JAN2024 | 0.20 | 0.010 | Low | 24141 | 756 | 23558 |
| 4 | S004 | Bathroom | 45 | 40 | 5.0 | 160 | 85 | 15JAN2024 | 0.40 | 0.050 | Medium | 24141 | 751 | 23558 |
| 5 | S005 | Garage | 20 | 70 | 15.0 | 300 | 60 | 20JAN2024 | 0.70 | 0.150 | High | 24141 | 746 | 23558 |
| 6 | S006 | Hall | 60 | 25 | 2.0 | 110 | 96 | 25JAN2024 | 0.25 | 0.020 | Low | 24141 | 741 | 23558 |
| 7 | S007 | Balcony | 10 | 15 | 1.0 | 70 | 99 | 01FEB2024 | 0.15 | 0.010 | Low | 24141 | 734 | 23589 |
| 8 | S008 | Office | 50 | 60 | 10.0 | 220 | 75 | 05FEB2024 | 0.60 | 0.100 | Low | 24141 | 730 | 23589 |
| 9 | S009 | Dining | 30 | 45 | 6.0 | 180 | 88 | 10FEB2024 | 0.45 | 0.060 | Medium | 24141 | 725 | 23589 |
| 10 | S010 | KidsRoom | 20 | 30 | 3.0 | 100 | 94 | 15FEB2024 | 0.30 | 0.030 | Low | 24141 | 720 | 23589 |
| 11 | S011 | StoreRoom | 10 | 10 | 0.5 | 50 | 100 | 20FEB2024 | 0.10 | 0.005 | Low | 24141 | 715 | 23589 |
| 12 | S012 | Kitchen | 25 | 65 | 12.0 | 240 | 72 | 25FEB2024 | 0.65 | 0.120 | High | 24141 | 710 | 23589 |
| 13 | S013 | LivingRoom | 55 | 38 | 4.0 | 150 | 90 | 01MAR2024 | 0.38 | 0.040 | Medium | 24141 | 705 | 23620 |
| 14 | S014 | Bedroom | 15 | 22 | 1.0 | 90 | 97 | 05MAR2024 | 0.22 | 0.010 | Low | 24141 | 701 | 23620 |
| 15 | S015 | Garage | 30 | 75 | 18.0 | 350 | 55 | 10MAR2024 | 0.75 | 0.180 | High | 24141 | 696 | 23620 |
| 16 | S016 | Office | 60 | 58 | 9.0 | 210 | 78 | 15MAR2024 | 0.58 | 0.090 | Medium | 24141 | 691 | 23620 |
| 17 | S017 | Hall | 20 | 28 | 2.0 | 95 | 96 | 20MAR2024 | . | . | . | . | . | |
| 18 | S018 | Office | 50 | 62 | 11.0 | 230 | 74 | 25MAR2024 | . | . | . | . | . |
proc sort data=smart_sensors;by Sensor_ID;run;
proc print data=smart_sensors;
run;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date | Power_Pct | Error_Pct | Utilization | Today | Days_Active | Next_Service |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | 60 | 35 | 2.0 | 120 | 95 | 01JAN2024 | 0.35 | 0.020 | Medium | 24141 | 765 | 23558 |
| 2 | S002 | Kitchen | 30 | 55 | 8.0 | 200 | 70 | 05JAN2024 | 0.55 | 0.080 | Medium | 24141 | 761 | 23558 |
| 3 | S003 | Bedroom | 15 | 20 | 1.0 | 80 | 98 | 10JAN2024 | 0.20 | 0.010 | Low | 24141 | 756 | 23558 |
| 4 | S004 | Bathroom | 45 | 40 | 5.0 | 160 | 85 | 15JAN2024 | 0.40 | 0.050 | Medium | 24141 | 751 | 23558 |
| 5 | S005 | Garage | 20 | 70 | 15.0 | 300 | 60 | 20JAN2024 | 0.70 | 0.150 | High | 24141 | 746 | 23558 |
| 6 | S006 | Hall | 60 | 25 | 2.0 | 110 | 96 | 25JAN2024 | 0.25 | 0.020 | Low | 24141 | 741 | 23558 |
| 7 | S007 | Balcony | 10 | 15 | 1.0 | 70 | 99 | 01FEB2024 | 0.15 | 0.010 | Low | 24141 | 734 | 23589 |
| 8 | S008 | Office | 50 | 60 | 10.0 | 220 | 75 | 05FEB2024 | 0.60 | 0.100 | Low | 24141 | 730 | 23589 |
| 9 | S009 | Dining | 30 | 45 | 6.0 | 180 | 88 | 10FEB2024 | 0.45 | 0.060 | Medium | 24141 | 725 | 23589 |
| 10 | S010 | KidsRoom | 20 | 30 | 3.0 | 100 | 94 | 15FEB2024 | 0.30 | 0.030 | Low | 24141 | 720 | 23589 |
| 11 | S011 | StoreRoom | 10 | 10 | 0.5 | 50 | 100 | 20FEB2024 | 0.10 | 0.005 | Low | 24141 | 715 | 23589 |
| 12 | S012 | Kitchen | 25 | 65 | 12.0 | 240 | 72 | 25FEB2024 | 0.65 | 0.120 | High | 24141 | 710 | 23589 |
| 13 | S013 | LivingRoom | 55 | 38 | 4.0 | 150 | 90 | 01MAR2024 | 0.38 | 0.040 | Medium | 24141 | 705 | 23620 |
| 14 | S014 | Bedroom | 15 | 22 | 1.0 | 90 | 97 | 05MAR2024 | 0.22 | 0.010 | Low | 24141 | 701 | 23620 |
| 15 | S015 | Garage | 30 | 75 | 18.0 | 350 | 55 | 10MAR2024 | 0.75 | 0.180 | High | 24141 | 696 | 23620 |
| 16 | S016 | Office | 60 | 58 | 9.0 | 210 | 78 | 15MAR2024 | 0.58 | 0.090 | Medium | 24141 | 691 | 23620 |
| 17 | S017 | Hall | 20 | 28 | 2.0 | 95 | 96 | 20MAR2024 | . | . | . | . | . | |
| 18 | S018 | Office | 50 | 62 | 11.0 | 230 | 74 | 25MAR2024 | . | . | . | . | . |
proc sort data=fraud_sensors;by Sensor_ID;run;
proc print data=fraud_sensors;
run;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date | Power_Pct | Error_Pct | Utilization | Today | Days_Active | Next_Service | Fraud_Flag |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | 60 | 35 | 2.0 | 120 | 95 | 01JAN2024 | 0.35 | 0.020 | Medium | 24141 | 765 | 23558 | NO |
| 2 | S002 | Kitchen | 30 | 55 | 8.0 | 200 | 70 | 05JAN2024 | 0.55 | 0.080 | Medium | 24141 | 761 | 23558 | NO |
| 3 | S003 | Bedroom | 15 | 20 | 1.0 | 80 | 98 | 10JAN2024 | 0.20 | 0.010 | Low | 24141 | 756 | 23558 | NO |
| 4 | S004 | Bathroom | 45 | 40 | 5.0 | 160 | 85 | 15JAN2024 | 0.40 | 0.050 | Medium | 24141 | 751 | 23558 | NO |
| 5 | S005 | Garage | 20 | 70 | 15.0 | 300 | 60 | 20JAN2024 | 0.70 | 0.150 | High | 24141 | 746 | 23558 | YES |
| 6 | S006 | Hall | 60 | 25 | 2.0 | 110 | 96 | 25JAN2024 | 0.25 | 0.020 | Low | 24141 | 741 | 23558 | NO |
| 7 | S007 | Balcony | 10 | 15 | 1.0 | 70 | 99 | 01FEB2024 | 0.15 | 0.010 | Low | 24141 | 734 | 23589 | NO |
| 8 | S008 | Office | 50 | 60 | 10.0 | 220 | 75 | 05FEB2024 | 0.60 | 0.100 | Low | 24141 | 730 | 23589 | NO |
| 9 | S009 | Dining | 30 | 45 | 6.0 | 180 | 88 | 10FEB2024 | 0.45 | 0.060 | Medium | 24141 | 725 | 23589 | NO |
| 10 | S010 | KidsRoom | 20 | 30 | 3.0 | 100 | 94 | 15FEB2024 | 0.30 | 0.030 | Low | 24141 | 720 | 23589 | NO |
| 11 | S011 | StoreRoom | 10 | 10 | 0.5 | 50 | 100 | 20FEB2024 | 0.10 | 0.005 | Low | 24141 | 715 | 23589 | NO |
| 12 | S012 | Kitchen | 25 | 65 | 12.0 | 240 | 72 | 25FEB2024 | 0.65 | 0.120 | High | 24141 | 710 | 23589 | YES |
| 13 | S013 | LivingRoom | 55 | 38 | 4.0 | 150 | 90 | 01MAR2024 | 0.38 | 0.040 | Medium | 24141 | 705 | 23620 | NO |
| 14 | S014 | Bedroom | 15 | 22 | 1.0 | 90 | 97 | 05MAR2024 | 0.22 | 0.010 | Low | 24141 | 701 | 23620 | NO |
| 15 | S015 | Garage | 30 | 75 | 18.0 | 350 | 55 | 10MAR2024 | 0.75 | 0.180 | High | 24141 | 696 | 23620 | YES |
| 16 | S016 | Office | 60 | 58 | 9.0 | 210 | 78 | 15MAR2024 | 0.58 | 0.090 | Medium | 24141 | 691 | 23620 | NO |
data merged;
merge smart_sensors
fraud_sensors;
by Sensor_ID;
run;
proc print data=merged;
run;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Data_Frequency | Power_Consumption | Error_Rate | Latency | Reliability_Score | Install_Date | Power_Pct | Error_Pct | Utilization | Today | Days_Active | Next_Service | Fraud_Flag |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | 60 | 35 | 2.0 | 120 | 95 | 01JAN2024 | 0.35 | 0.020 | Medium | 24141 | 765 | 23558 | NO |
| 2 | S002 | Kitchen | 30 | 55 | 8.0 | 200 | 70 | 05JAN2024 | 0.55 | 0.080 | Medium | 24141 | 761 | 23558 | NO |
| 3 | S003 | Bedroom | 15 | 20 | 1.0 | 80 | 98 | 10JAN2024 | 0.20 | 0.010 | Low | 24141 | 756 | 23558 | NO |
| 4 | S004 | Bathroom | 45 | 40 | 5.0 | 160 | 85 | 15JAN2024 | 0.40 | 0.050 | Medium | 24141 | 751 | 23558 | NO |
| 5 | S005 | Garage | 20 | 70 | 15.0 | 300 | 60 | 20JAN2024 | 0.70 | 0.150 | High | 24141 | 746 | 23558 | YES |
| 6 | S006 | Hall | 60 | 25 | 2.0 | 110 | 96 | 25JAN2024 | 0.25 | 0.020 | Low | 24141 | 741 | 23558 | NO |
| 7 | S007 | Balcony | 10 | 15 | 1.0 | 70 | 99 | 01FEB2024 | 0.15 | 0.010 | Low | 24141 | 734 | 23589 | NO |
| 8 | S008 | Office | 50 | 60 | 10.0 | 220 | 75 | 05FEB2024 | 0.60 | 0.100 | Low | 24141 | 730 | 23589 | NO |
| 9 | S009 | Dining | 30 | 45 | 6.0 | 180 | 88 | 10FEB2024 | 0.45 | 0.060 | Medium | 24141 | 725 | 23589 | NO |
| 10 | S010 | KidsRoom | 20 | 30 | 3.0 | 100 | 94 | 15FEB2024 | 0.30 | 0.030 | Low | 24141 | 720 | 23589 | NO |
| 11 | S011 | StoreRoom | 10 | 10 | 0.5 | 50 | 100 | 20FEB2024 | 0.10 | 0.005 | Low | 24141 | 715 | 23589 | NO |
| 12 | S012 | Kitchen | 25 | 65 | 12.0 | 240 | 72 | 25FEB2024 | 0.65 | 0.120 | High | 24141 | 710 | 23589 | YES |
| 13 | S013 | LivingRoom | 55 | 38 | 4.0 | 150 | 90 | 01MAR2024 | 0.38 | 0.040 | Medium | 24141 | 705 | 23620 | NO |
| 14 | S014 | Bedroom | 15 | 22 | 1.0 | 90 | 97 | 05MAR2024 | 0.22 | 0.010 | Low | 24141 | 701 | 23620 | NO |
| 15 | S015 | Garage | 30 | 75 | 18.0 | 350 | 55 | 10MAR2024 | 0.75 | 0.180 | High | 24141 | 696 | 23620 | YES |
| 16 | S016 | Office | 60 | 58 | 9.0 | 210 | 78 | 15MAR2024 | 0.58 | 0.090 | Medium | 24141 | 691 | 23620 | NO |
| 17 | S017 | Hall | 20 | 28 | 2.0 | 95 | 96 | 20MAR2024 | . | . | . | . | . | ||
| 18 | S018 | Office | 50 | 62 | 11.0 | 230 | 74 | 25MAR2024 | . | . | . | . | . |
14. CHARACTER FUNCTIONS
data smart_sensors;
set smart_sensors;
Sensor_Clean = strip(Sensor_ID);
Room_Upper = upcase(Room_Type);
Room_Lower = lowcase(Room_Type);
Room_Proper = propcase(Room_Type);
Label = catx("-", Sensor_ID, Room_Type);
run;
proc print data=smart_sensors;
var Sensor_ID Room_Type Sensor_Clean Room_Upper Room_Lower Label;
run;
OUTPUT:
| Obs | Sensor_ID | Room_Type | Sensor_Clean | Room_Upper | Room_Lower | Label |
|---|---|---|---|---|---|---|
| 1 | S001 | LivingRoom | S001 | LIVINGROOM | livingroom | S001-LivingRoom |
| 2 | S002 | Kitchen | S002 | KITCHEN | kitchen | S002-Kitchen |
| 3 | S003 | Bedroom | S003 | BEDROOM | bedroom | S003-Bedroom |
| 4 | S004 | Bathroom | S004 | BATHROOM | bathroom | S004-Bathroom |
| 5 | S005 | Garage | S005 | GARAGE | garage | S005-Garage |
| 6 | S006 | Hall | S006 | HALL | hall | S006-Hall |
| 7 | S007 | Balcony | S007 | BALCONY | balcony | S007-Balcony |
| 8 | S008 | Office | S008 | OFFICE | office | S008-Office |
| 9 | S009 | Dining | S009 | DINING | dining | S009-Dining |
| 10 | S010 | KidsRoom | S010 | KIDSROOM | kidsroom | S010-KidsRoom |
| 11 | S011 | StoreRoom | S011 | STOREROOM | storeroom | S011-StoreRoom |
| 12 | S012 | Kitchen | S012 | KITCHEN | kitchen | S012-Kitchen |
| 13 | S013 | LivingRoom | S013 | LIVINGROOM | livingroom | S013-LivingRoom |
| 14 | S014 | Bedroom | S014 | BEDROOM | bedroom | S014-Bedroom |
| 15 | S015 | Garage | S015 | GARAGE | garage | S015-Garage |
| 16 | S016 | Office | S016 | OFFICE | office | S016-Office |
| 17 | S017 | Hall | S017 | HALL | hall | S017-Hall |
| 18 | S018 | Office | S018 | OFFICE | office | S018-Office |
15. PROC DATASETS DELETE
proc datasets library=work;
delete transposed;
run;
quit;
LOG:
16. KEY BUSINESS INSIGHTS
From the analysis of smart home sensor data, several important insights can be derived:
- Sensors installed in Garages and Kitchens tend to consume more power.
- Higher latency generally leads to lower reliability scores.
- Sensors with error rates above 10% show suspicious behavior and require investigation.
- Older sensors show declining performance compared to recently installed ones.
- Rooms with more automation devices generate higher data frequency.
These insights help organizations optimize infrastructure and improve customer satisfaction.
17. PRACTICAL APPLICATIONS
This type of analytics system is used in real-world scenarios such as:
- Smart city monitoring
- Energy management systems
- Hospital automation
- Industrial IoT platforms
- Security surveillance systems
- Predictive maintenance systems
18. INTERVIEW AND CAREER RELEVANCE
This project is highly valuable for:
- SAS Programmer interviews
- Data Analyst roles
- IoT analytics positions
- Business intelligence profiles
It demonstrates skills in:
- Data engineering
- Statistical analysis
- SQL programming
- Automation
- Visualization
- Business interpretation
Recruiters prefer candidates who can explain:
- Business problem
- Data logic
- Technical implementation
- Insights and conclusions
This project fulfills all those expectations.
CONCLUSION
The Smart Home Sensors Analytics using SAS project provides a complete demonstration of how real-world IoT data can be analyzed using SAS. Starting from data creation to final business insights, the project covers every important stage of the analytics lifecycle.
By implementing statistical procedures, SQL queries, macros, and visualization techniques, this project successfully transforms raw sensor data into actionable intelligence. It highlights the importance of monitoring sensor performance, detecting anomalies, and ensuring system reliability in smart environments.
From a learning perspective, this project strengthens understanding of core SAS concepts such as data steps, procedures, macros, functions, and reporting. From a business perspective, it shows how data analytics supports operational efficiency, cost reduction, risk management, and strategic planning.
In summary, this project acts as a bridge between technical SAS programming skills and real-world business applications, making it an ideal case study for both academic learning and professional development.
INTERVIEW QUESTIONS FOR YOU
· What is %DO and %END?
· What is %PUT?
· What is the difference between local and global macro variables?
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
About the Author:
SAS Learning Hub is a data analytics and SAS programming platform focused on clinical, financial, and real-world data analysis. The content is created by professionals with academic training in Pharmaceutics and hands-on experience in Base SAS, PROC SQL, Macros, SDTM, and ADaM, providing practical and industry-relevant SAS learning resources.
Disclaimer:
The datasets and analysis in this article are created for educational and demonstration purposes only. They do not represent SMART HOME data.
Our Mission:
This blog provides industry-focused SAS programming tutorials and analytics projects covering finance, healthcare, and technology.
This project is suitable for:
· Students learning SAS
· Data analysts building portfolios
· Professionals preparing for SAS interviews
· Bloggers writing about analytics and smart cities
· EV and energy industry professionals
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Follow Us On :
To deepen your understanding of SAS analytics, please refer to our other data science and industry-focused projects listed below:
1.Can SAS Predict Airline Disasters Before They Happen?
2.Which Indian Cuisine Dominates the Restaurant Market? Complete Sas Data
3.Which Is the Most Spoken Language in India?Complete Sas Data
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Comments
Post a Comment