跳到主要內容

在Excel中通過給定的均值和標準差生成隨機數

在某些情況下,您可能希望根據給定的特定均值和標準差生成一系列隨機數,如何快速解決此問題? 現在,本教程將為您介紹一種在Excel中處理它的方法。

通過給定的均值和標準差生成隨機數


箭頭藍色右氣泡 通過給定的均值和標準差生成隨機數

要解決此問題,您需要執行以下步驟:

1.首先,您需要在兩個空白單元格中鍵入所需的均值和標準差,在這裡,我選擇A1和A2。 看截圖:doc-randomize-mean-stdv-1

2.然後在單元格B3中,鍵入此公式 = NORMINV(RAND(),$ B $ 1,$ B $ 2),然後將填充手柄拖到所需的範圍。 看截圖:doc-randomize-mean-stdv-2

尖端: 在公式 = NORMINV(RAND(),$ B $ 1,$ B $ 2),$ B $ 1表示平均值,$ B $ 2表示標準偏差。

3.然後在單元格D1和D2中,您需要計算在步驟2中插入的隨機數的平均值和標準偏差。在D1中,計算平均值,鍵入 =平均(B3:B16),按Enter鍵,然後在D2中計算標準偏差,輸入 = STDEV.P(B3:B16) 並按下Enter鍵。

提示:在Excel 2007中,您需要輸入公式 = STDEVP(B3:B16) 計算第一個隨機數的標準差。

doc-randomize-mean-stdv-3
doc-randomize-mean-stdv-4

尖端:B3:B16是您在步驟2中對數字進行隨機化的範圍。

4.現在,您可以生成所需的真實隨機數。 在單元格D3中,鍵入此公式 =$B$1+(B3-$D$1)*$B$2/$D$2,然後將填充手拖到所需的範圍。 看截圖:
doc-randomize-mean-stdv-5

尖端:B1表示所需的均值,B2表示所需的標準差,B3表示第一個隨機數的第一個像元,D1是第一個隨機數的平均值,D2是第一個隨機數的標準差。

您可以檢查最終隨機數序列的均值和標準差。

5.在單元格D17中,鍵入 = AVERAGR(D3:D16) 然後按Enter鍵,然後在單元格D18中鍵入 = STDEV.P(D3:D16) = STDEVP(D3:D16) 在Excel 2007中),然後按 Enter 鍵。
doc-randomize-mean-stdv-6

尖端:D3:D16是最後一個隨機數序列的範圍。


輕鬆插入隨機數據,在一系列單元格中沒有重複項

如果您想在一系列單元格中插入隨機且沒有重複的整數,日期,時間或字符串,甚至是自定義列表,那麼論壇可能很難記住。 但 Kutools for Excel的插入器隨機數據 可以盡快輕鬆地處理這些工作。 單擊以獲取全部功能 30 天免費試用!
doc插入隨機數據
 
Kutools for Excel:擁有300多個便捷的Excel加載項,可以在30天內免費試用。

相關文章:

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Sizin yapacağınız çeviriyi miksinler....
This comment was minimized by the moderator on the site
Muy útil, muchas gracias.
This comment was minimized by the moderator on the site
Super helpful! Can you please explain how you get the formula for the Final Random numbers please?
This comment was minimized by the moderator on the site
So why do you use the NORMINV function instead of the NORM.DIST function? What benefit does having the inverse of a distribution over
This comment was minimized by the moderator on the site
Is there a way to insert upper and lower limits to this formula?
This comment was minimized by the moderator on the site
Kewl. I used this to simulate market returns. However, I should mention that Mean is not the same as CAGR; i.e. I had to adjust the Mean higher to obtain my desired return.
This comment was minimized by the moderator on the site
Thank you soooo much, I've looking for this all day. Extremely helpful !
This comment was minimized by the moderator on the site
Amazing! Thanks for this post. It works!
This comment was minimized by the moderator on the site
this is really helpful, but i have a problem with negative value. what should i do?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations