開始使用免費開始

預測測驗分數

根據讀書時數與學生在某次測驗分數之間的關係,你已經得到了線性模型的參數 slopeintercept。用這些參數來預測一位讀書 10 小時的學生會拿到的分數。

在這個練習中,已經替你從 scipy.stats 匯入 linregress() 函式。

本練習屬於課程

Python 機率基礎

檢視課程

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Get the predicted test score for given hours of study
score = slope*____ + ____
print('score:', ____)
編輯並執行程式碼